Examples provide a system for watering plants on a rack. A robotic device attaches to a portion of the rack and pulls or pushes the rack to a watering zone. A sprinkler device sprays water to evenly distribute water across all plants on the rack. The system determines quantity of water, duration of watering, and frequency of watering based on real-time sensor data and context data associated with the environment, historical watering data, condition of the plants on the rack and a set of customized maintenance rules based on the type of plants on the rack. When watering is complete, the robotic device returns the rack to a designated location and detaches from the rack. The robotic device then attaches to another rack having plants on it scheduled for watering. The watering schedule is updated dynamically based on changing weather and plant state.