Jump to content

How to Trigger a scheduled program to run overnight


rayg

Recommended Posts

Posted (edited)

Hello, I want to schedule the occasional "pond fill" for 3 hours staring at 3am but on demand.  

Google searches failed.

Q1: Is my only recourse a program to set a variable to true and after PondFill execution back to false?   

Something like this?:

If $OvernightPondFill = 1 and Time is 3:00:00 AM

THEN 

  Run program PondFill3Hours (THEN)

  Set $OvernightPndFill = 0

ELSE

 

Q2: is there a difference between a State or Integer variable when it comes to this?   I'm not clear on that.

 

Thanks for your help

...Ray

 

 

Edited by rayg
Posted (edited)
On 5/25/2021 at 3:11 PM, rayg said:

Hello, I want to schedule the occasional "pond fill" for 3 hours staring at 3am but on demand.  

Google searches failed.

Q1: Is my only recourse a program to set a variable to true and after PondFill execution back to false?   

Something like this?:

If $OvernightPondFill = 1 and Time is 3:00:00 AM

THEN 

  Run program PondFill3Hours (THEN)

  Set $OvernightPndFill = 0

ELSE

 

Q2: is there a difference between a State or Integer variable when it comes to this?   I'm not clear on that.

 

Thanks for your help

...Ray

 

 

Looks good to me. In this case an Integer or a State variable would work. I prefer the Integer variable as they take any evaluation time from the ISY logic engine and you are not trying to trigger your program from the variable. Most mark State Variables with an 's' prefix. This is to avoid confusion later. You can also mark your Integer variables with a prefix 'i' but I don't bother with marking Integer types.

Personally I would reset the variable at the end of the program PondFill3Hours program and I like to run (If) so I can introduce more options for the run.
eg: If time 6-9 PM run Then (6 hours of time) Else (3 hours of time). Disable the program so no triggers can disrupt it then.

Install some recovery program lines in case power fails or you reboot ISY in the middle of the run cycle.

Enable "Run at Startup" in the program summary

If
    Time is 3:00:00 AM
    AND
    $OvernightPondFill = 1
THEN 
    Run program PondFill3Hours (IF)

Else  <-------------------------- this will always run when Run at Startup triggers because 3:00 AM will always be False
    Set $OvernightPndFill = 0    <-------------pretend cycle was completed  (optional)
   Stop PondFill3Hours  <----------------just in case it self ran??
   set PumpOrValve Off  <----------------may have been left on, will short any running cycle though

 

 

Edited by larryllix
  • Like 2
Posted (edited)

Sorry for the late reply Larry, I thought I posted a thank you on Tuesday but don't see it here. 

Thanks very much for the reply, I implemented all that you suggested the next morning and look forward to testing overnight soon.

...Ray

Edited by rayg
  • Like 1
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

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