Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to Trigger a scheduled program to run overnight

Featured Replies

Posted

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

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

  • Author

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

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.