Cron Trigger
Introduction
The PayGate workflow Cron trigger takes a cron expression and runs a workflow when the date and time in the cron expression is satisfied. You can use the cron trigger to create simple or complex workflows that trigger once or repeat at regular intervals.
For example you can use a cron trigger to: - Run a workflow every minute - Run a workflow every Monday and Wednesday at 10am and 3pm
How Cron expressions work
The cron format is made up of 5 or 6 parts, for example:
0 0 10 1 * *
They look a bit cryptic at first and so lets break it down. Each ‘part’ of the cron expression represents a element of the schedule:
* * * * * *
┬ ┬ ┬ ┬ ┬ ┬
│ │ │ │ │ │
│ │ │ │ │ └ day of week (0 - 7) (0 or 7 is Sunday)
│ │ │ │ └───── month (1 - 12)
│ │ │ └────────── day of month (1 - 31)
│ │ └─────────────── hour (0 - 23)
│ └──────────────────── minute (0 - 59)
└───────────────────────── second (0 - 59) Optional
For example if the ‘day of week’ (dow) part is set to 1 then the cron trigger will only occur on Monday. Setting * is a universal way of say ‘any day’.
Settings
Enabled
Determines whether the trigger is enabled or not. A trigger that is not enabled with never execute any bound workflows.
Supress on BACS non-working days
If enabled a trigger will not run any bound workflows if the trigger event occurs on a BACS non-processing day. Bacs non processing days are weekends and UK (English) bank holidays.
CRON Quiet time
You may set a trigger for evey hour but you might not want it to run 24 hours. You may only want the trigger to execute workflows during, say, business hours. Setting a CROn quite time can help wi this. By setting a start and end time, you can suppress a trigger from executing workflows during those times. For example, setting a start time of 19:00 and an end time of 0700, you can disable the cron trigger from 7pm to 7am. The cron trigger will function normally outside of those hours (7am to 7pm).
In the above configuration, the cron trigger will start executing bound workflows from 07:01.
Notes
Limitations in PayGate cron expressions
At the moment, W (nearest weekday), L (last day of month/week), and # (the nth weekday of the month) are not supported by PayGate.