Event Schedule
Last updated
Last updated
Event Schedules allow a specified event to be raised on an asset (and any currently running order) to start an activity at a specific recurring time. For instance, raise event type 'Start of Week' at 7am every Monday.
We can define this behavior by using an expression tool called cron. Most importantly, these events can then be used to generate activities at specific times of day.
Navigation: Settings > Configuration > Event Schedule > Create
You will be presented with a pop-up.
Event Schedules can also be added by selecting an Event Type in the table and going to the Event Type section below the basic information
Name | Description |
---|---|
Name * | Name of the event. |
Event Type | Select an event that, when cron expression is true, will be created. |
Asset | The asset which the event will be raised on. |
Cron Expression | the cron expression that will determine when to create an event. (e.g. 0 5 * * * ) |
A cron expression is a string representing a schedule in the Unix cron syntax. It is used to define the frequency and timing of tasks to be executed. A cron expression consists of five fields, representing minutes, hours, days of the month, months, and days of the week. Here are five examples of cron expressions:
0 3 * * *
: This expression schedules a task to run at 3:00 AM (03:00) every day. The task will run at the third hour (3) and zero minutes (0) of every day of the month, every month, and every day of the week.
30 18 * * 1-5
: This expression schedules a task to run at 6:30 PM (18:30) every weekday (Monday through Friday). The task will run at the 18th hour (18) and 30 minutes (30) of every day of the month, every month, and on days 1 to 5 of the week (1 = Monday, 5 = Friday).
15 12 1 * *
: This expression schedules a task to run at 12:15 PM (12:15) on the first day of every month. The task will run at the 12th hour (12) and 15 minutes (15) on the first day (1) of every month, and on every day of the week.
0 */4 * * *
: This expression schedules a task to run every 4 hours, at the top of the hour (e.g., 12:00, 4:00, 8:00, etc.). The task will run at zero minutes (0) of every hour divisible by 4, every day of the month, every month, and every day of the week.
0 0 * * 0
: This expression schedules a task to run at midnight (00:00) every Sunday. The task will run at the zeroth hour (0) and zero minutes (0) of every day of the month, every month, and on the zeroth day of the week (0 = Sunday).
You can use this website (external) to translate the cron expression into a human readable sentence.
Click the Save and close button to finalise.
Now the selected Event Type will be raised on the asset the next time the cron expression is true. If an order is running on that asset, it will also be attached to the event. All cron expression are evaluated in the local time of the site.