Periodic automatic irrigation for sprinkler