Jump to content

How to get a schedule for every other day?


ben-smith

Recommended Posts

Posted

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,

  • 2 months later...
Posted

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

  • 3 weeks later...
Posted

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.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...