GuidesTriggers
Schedule
Run graphs automatically on a cron-based schedule.
A schedule trigger executes a graph on a recurring schedule defined by a cron expression. You configure the schedule and optional timezone, and Swirls runs the graph from the attached root node at each scheduled time.
Overview
Schedule triggers automate recurring workflows:
- Time-based execution -- Run graphs at specific times of day, days of the week, or on any interval supported by cron syntax.
- No infrastructure -- Swirls manages the scheduling. You do not need to host or maintain your own cron jobs.
- Automatic next-run computation -- After each execution, Swirls computes the next run time from the cron expression automatically.
Configuration
To set up a schedule trigger:
- Create a trigger of type
schedulein the Portal or via the API. - Set the cron expression to define when the graph should run (for example,
0 9 * * 1for every Monday at 9:00). - Set the timezone so runs align with your business hours rather than UTC.
- Attach the trigger to a root node of your graph. The graph must have a root node (a node with no incoming edges) before a trigger can be attached.
Once configured, the trigger can be enabled or disabled without removing it from the graph.
Cron expression syntax
Swirls uses standard five-field cron syntax:
minute hour day-of-month month day-of-weekEach field accepts numbers, ranges, wildcards (*), and step values. Examples:
| Expression | Description |
|---|---|
0 * * * * | Every hour at minute 0 |
0 9 * * 1-5 | 9:00 AM on weekdays |
0 0 * * * | Daily at midnight |
0 9 * * 1 | Every Monday at 9:00 AM |
*/15 * * * * | Every 15 minutes |
0 0 1 * * | First day of every month |
Set the timezone so scheduled times reflect your local business hours rather than UTC.
Use cases
- Reports -- Generate a weekly summary every Monday morning.
- Data enrichment -- Pull and enrich new leads on an hourly cadence.
- Maintenance -- Run cleanup or sync graphs daily during off-peak hours.
- Monitoring -- Check system health or SLA compliance at regular intervals.