Schedules
A schedule connects a cron expression to one of your operations. At each matching time Fóir runs that operation and adds the run to the schedule's history.
Cron and timezone
The expression is standard five-field cron: minute, hour, day of month, month and day of week. There is no seconds field, and Fóir checks for due schedules every 60 seconds. A schedule can name an IANA timezone and runs in UTC without one.
Config, console and CLI
defineSchedule in your config takes a key, a name, the operation's key, the cron expression, a timezone and an enabled flag, so schedules sit in config as code with the rest of the project. The console lists each schedule's cron, its last run status and its next run, with the execution history. foir schedules does the same work from a terminal, including pausing, resuming and triggering a schedule immediately.
When a change takes effect
Pausing and resuming apply as soon as they are pushed. A new schedule, or a change to a schedule's cron, timezone or operation, waits for the next release before it runs.
What the operation receives
The operation gets the standard payload with a trigger type of schedule and no record. A schedule can occasionally fire twice, so write scheduled operations to be idempotent. A templated operation, the kind Fóir calls itself from a request template, cannot be scheduled.
Read the detail
The schedules guide covers creating, pausing and triggering a schedule and reading its history.