Jump to content

How to get a schedule for every other day?


ben-smith

Recommended Posts

Maybe I just haven't had enough coffee yet, trying to figure out a watering schedule for my in-laws property. He'd like the zones watered 20 minutes each, every other day. I've got the zone timings OK, just trying to figure out how to have the program evaluate running 'every other' day. Thanks,

Link to comment
  • 2 months later...

If you're running 3.1.x firmware you can use a variable to determine whether to run the sprinklers or not.

 

if
 time is 5:00am
and
 $Irrigation is 1
then
 ......
 ......  run the sprinkler zones
 $Irrigation is 0
else
 $Irrigation is 1

Link to comment
  • 3 weeks later...

I wanted to do the same thing, but due to city regulations, I can only water during odd days. Odd addressed can water during Odd days, and Even adresses during even days.

 

So, if that can be useful to someone, here's what I did.

 

This program runs daily:

If
       Time is 12:02:00AM

Then
       $iDayOfMonth += 1
       $iDayOfMonth Init To $iDayOfMonth
       $iDayOfMonthDiv2  = $iDayOfMonth
       $iDayOfMonthDiv2 /= 2
       $iDayOfMonthDiv2 *= 2
       Run Program 'SetDoMOdd' (If)

Else
  - No Actions - (To add one, press 'Action')

 

If the day = day/2*2, then it's not an Odd day:

If
       $iDayOfMonthDiv2 is $iDayOfMonth

Then
       $sDoMOdd  = 0

Else
       $sDoMOdd  = 1

 

But we need to restart correctly at the beginning of each month.

If
       Time is 12:01:00AM on 2011/09/01
    Or Time is 12:01:00AM on 2011/10/01
    Or Time is 12:01:00AM on 2011/11/01

Then
       $iDayOfMonth  = 0
       $iDayOfMonth Init To 0

Else
  - No Actions - (To add one, press 'Action')

 

For now, this is not ideal as we need to hardcode the next few months, but that allowed me to get going for the fall. Perhaps eventually we will be able to extract the Day of the month in a variable, or set a schedule for every xth day of a month.

 

Benoit.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...