Skip to content
Pyrula

Schedules

A schedule fires an agent on a cron expression. The worker runs a schedule loop that submits a turn whenever a schedule is due, so scheduled runs get the same durability and replay as any other turn.

Manage schedules with the pyrula schedules subcommand. They live in the store, so the worker picks them up without a restart.

Terminal window
pyrula schedules create \
--agent nightly-report \
--cron "0 2 * * *" \
--params '{"window": "24h"}'

--cron is a standard 5-field expression (minute, hour, day-of-month, month, day-of-week). --params is a JSON object passed to the agent as its inputs. The example runs nightly-report at 02:00 every day.

Terminal window
pyrula schedules list --agent nightly-report
pyrula schedules pause --schedule-id <id>
pyrula schedules resume --schedule-id <id>
pyrula schedules delete --schedule-id <id>

pause stops a schedule from firing without deleting it; resume turns it back on.

The worker checks for due schedules on an interval (--schedule-poll-interval, 30s by default), so a run fires within that window of its cron time rather than to the exact second. If no worker is running, nothing fires; the schedule resumes when one comes back.