How to create a scheduler

Hi,

Is there a way to create a scheduler in Ignition,
where a user can specify which day and time in a week an action to be executed.

Thank you.

Yes, in your project designer navigate Scripting → Gateway Events → Scheduled

Gateway Event Scripts - Ignition User Manual 8.1 - Ignition Documentation (inductiveautomation.com)

1 Like

Cool. and Thanks.

I will explore this.

Is there is no way to parametrize the hours? What I want to do is to create a project in which the final user can use a GUI to select the week schedule for some gates to open and close but using the scheduled events you can't bind the settings to tags or variables

  1. How many "open" periods per day? Note that if they cross midnight you'll probably need two - one to cover up to midnight and the other to start at midnight.
  2. How will you handle holidays, etc., or one-off schedules?

I'm thinking that you would set up an array with,
Day of week INT (0 = Monday, ... 7 = Sunday)
On time DateTime or String?
Off time DateTime or String?

Then you could run a scheduled task script every minute to check if you are in any of the "open" periods and set a tag appropriately.

1 Like