Artisan SVG > Scheduled Trigger (scheduled) (alarm-clock)
Artisan SVG > Scheduled Trigger (scheduled) (alarm-clock)

Scheduled Trigger
3.5

The Scheduled Trigger allows you to start workflows on a custom schedule

Overview
Copy

The Scheduled Trigger allows you to start workflows on a custom schedule, such as every monday at 9am or on Thursday 11th November each year.

Operations
Copy

  • Every Day

  • Every Month

  • Every Week

  • Interval

  • Cron Schedule (Advanced)

Allowing scheduled runs to complete
Copy

IMPORTANT!: When polling with a scheduled trigger, it is very important to make sure that a run of the workflow is allowed to complete before any more runs are triggered.

To do this first click on Advanced Properties and then tick the box as shown in the screenshot below.

Your schedule should also be set so that you allow plenty of time for runs to complete. In a case where 3 attempts at starting a run are made while one is still completing, these runs are missed. They are not added to a queue.

Extracting date info from the Scheduled Trigger
Copy

IMPORTANT!: It is not recommended to directly extract date information from the scheduled trigger, as the months are 'zero-indexed' (i.e. January is considered month '0' instead of month'1').

From the following screenshot you can see that the month of October is returned as '9' instead of '10'.

Therefore it is recommended that you use the Get Date Property operation to extract whatever date parameters you need from the Scheduled Trigger:

Common Properties
Copy

Input Property Description
Don't run until after (date) Use this property to make sure the workflow is not triggered until after the date. This doesn't change the schedule in any way, it only prevents any triggers from happening until after the date has passed.
Stop running after (date) Use this property to make sure the workflow is not triggered after the date. This doesn't change the schedule in any way, it only prevents any triggers from happening after the date has passed.
Timezone The timezone you want the schedule to run in.

Every Day
Copy

The every day operation allows you to run a schedule once per day, at a particular time of the day and on certain days of the week.

Input Property Description
Hour The hour of the day to trigger the workflow.
Minute The minute within the hour to trigger the workflow.
Day of week A list of week days that you can choose the workflow to trigger on. This allows you to build a custom schedule such as only Monday to Friday, Weekends or even Just Monday and Thursday.

Every Month
Copy

The every month operation allows you to trigger the workflow once a month based on the day of the month and a time of the day you specify.

Input Property Description
Day of Month The day of the month you want to trigger the workflow on. You can only chose one day of the month, such as the 3rd. If you want to do more advanced schedules, then see the Cron schedule operation.
Hour The hour of the day to trigger the workflow.
Minute The minute of the hour to trigger the workflow.

Every Week
Copy

The every week operation allows you to trigger the workflow once a week on a specific day and at a specific time.

Input Property Description
Day of week The day of the week (such as monday or friday) to trigger the workflow on. If you want to do more advanced schedules, then see the Cron schedule operation.
Hour The hour of the day to trigger the workflow.
Minute The minute of the hour to trigger the workflow.

Interval
Copy

The 'Interval' operation allows you to regularly trigger the workflow using a set interval, such as every minute or every week. The workflow will trigger first time when the first time interval elapses (unless you specify an after date) and the trigger time is based on when you either change the settings or start the workflow.

Input Property Description
Interval The number of units to use for the interval. For example setting here 5 and the Time unit to days would schedule the workflow to be triggered every 5 days from now.
Time unit The time unit to use in the schedule, such as days or weeks.

Cron Schedule (Advanced)
Copy

The cron schedule operation is an advanced one which allows you to specify a cron expression to trigger the workflow in a custom schedule.

Input Property Description
Cron Expression The cron expression that defines the schedule. See https://en.wikipedia.org/wiki/Cron for more details.

Cron Example
Copy

Cron is an incredibly powerful operation for when you need to have your workflow run at very specific times of the day. This is particularly useful if you need your workflow to trigger at multiple times per day but not at regular intervals. For this example we will set the workflow to run in the morning, mid-day and at the end of a workday. So at 08:00, 12:00, 18:00. You would set the Scheduled Trigger operation to Cron Schedule Advanced Like so:

Then in the Cron expression field you input 0 8,12,18 * * *. This expression in english means at “At minute 0 past hour 8, 12, and 18”. If you wanted to have it run at 08:30, 12:30, and 18:30 then it would be 30 8,12,18 * * *. The first number relating to how many minutes past the hour it should run. This is what it would look like in the input panel:

You'll notice there are 3 more slots after the '18'. Those slots are for (in order) the day of the month, the month, and the day of the week. So in our example it would run every day of the month, every month and every day of the week. The asterisks represent any/ all. You can find out more about cron expressions and how to generate them here: crontab guru .

Note on properties returned by the Scheduled Trigger
Copy

The following information is important if you are wishing to use jsonpaths to pull data from the scheduled trigger.

When looking at the output from the debug info for the scheduled trigger, note that both month and day_of_week are zero-indexed .

This means that January will be 0, February will be 1, etc.

Likewise, Monday will be 0, Tuesday will 1 etc.

The following debug screenshot shows how this is the case for Monday 27th January 2020: