Scheduling
Run workflows on a schedule, in your own time zone, and know when a schedule stops working.
Scheduling sits on top of a workflow's trigger. For a workflow to run on a timer, its trigger must be the Schedule Trigger (see Build a workflow), and the workflow must be Active. A scheduler can only attach to active, schedule-triggered workflows, so set that up first.
You then create a scheduler, which pairs a repeating schedule with the workflow to run and, optionally, the context values to run it with. A scheduler has no name to give: it is its schedule and its workflow.
Create a scheduler
- Open Ecosystem › Workflows, then the Schedulers tab.
- Click New. The Create scheduler dialog opens: Choose a workflow, when it runs and the context it runs with.
- Set the days under Repeat on and the Time (see the next section).
- Under Workflow to run, select the workflow. Only active workflows that start with a Schedule Trigger appear; if there are none, the list says No active workflow starts with a Schedule Trigger.
- If the workflow has context variables, a field appears for each; otherwise the dialog notes This workflow has no context variables.
- Click Create scheduler.
Setting the schedule
The schedule is a visual builder, so you never type raw cron text. It has two parts:
- Repeat on is a row of seven day toggles, Sunday to Saturday. Turn on the days you want. At least one day stays selected.
- Time sets the run time with an hour (00 to 23) and a minute (00 to 59).
Times are in your time zone, the one your browser reports, shown beside the time (for example GMT+2). The line next to it says when that is in UTC: In your time zone. Runs at 07:00 UTC. SPARK keeps the schedule in UTC, so after a daylight saving change the run time moves by an hour on your clock. A new schedule starts on Mondays at 09:00 your time.
The builder schedules a run at one specific time on the days you pick. It does not offer day-of-month, "every N minutes or hours", or other interval frequencies. A schedule an agent created with such a pattern reads as its cron text, in UTC, and opening it in the builder starts it over from the default.
The Schedule column in the list shows the result in plain language on your clock, such as Every day at 09:00, Every weekday at 09:00, or Every Monday, Wednesday at 09:00.
Batch runs from context values
In a new scheduler, each context variable accepts several values: type one and press Enter, as often as you need. Add several values to a variable to create one execution for each combination. When the values make more than one run, a notice shows how many, for example 2 executions, One is created for each combination of the values above. This is how you fan a single schedule out across, for example, several share classes or dates, as in the dialog above.
A Date variable can take a relative date, such as Trigger date (today), Trigger date - 1 day (yesterday), or T - a number of days, so each run looks at the right day. See Context variables.
Manage schedulers
The Schedulers list leads with each scheduler's Schedule, then the Workflow it runs (with the values its runs get under the name), Status, Last Run, Last Execution and Updated. The Status reads Active, Inactive, or Paused. Use the row's ⋯ to Edit schedule, to Enable or Disable it, or to Delete it.
Each run a schedule starts records which schedule started it: in Executions, the scheduler's icon sits before the workflow's name, and hovering it shows the schedule.
When a schedule keeps failing
A schedule that cannot start its workflow, for example because the workflow was deactivated or lost its trigger, no longer fails silently on every tick. SPARK records the outcome of each of its last 10 runs:
- After a failed run, the schedule waits 15 minutes before trying again, doubling the wait with each failure in a row.
- Once 5 of its last 10 runs have failed, it pauses itself. Its Status reads Paused; hover it for the reason, for example Paused after 5 failed runs: This workflow has no trigger…
A run counts as failed when at least 90% of its context combinations were refused, so a partly working schedule keeps running. Fix the cause, then choose Enable from the scheduler's ⋯: it starts afresh, its past failures forgotten.
Where to go next
- See runs a schedule created in Executions.
- Build the workflow a scheduler runs in Build a workflow.
- Trigger from incoming files instead in File-triggered workflows.