Jobs quickstart
A schedule declared, read back, paused and retired, with the calls that serve it.
A Schedule is declared in sylphx.toml and projected by the release; you read
and control it on api.sylphx.com.
1. Declare the Job
[[jobs]]
name = "nightly-report"
service = "worker"
command = ["python", "-m", "app.report"]
schedule = { cron = "0 1 * * *", timezone = "Asia/Hong_Kong" }Release the project. The release writes one Schedule for the row, named
job-nightly-report@<environment id>. It runs in the production environment;
add previews = true to the schedule to run it in the others too. An invalid
cron or timezone skips the row with manifest_job_schedule_invalid and keeps
what it already had.
2. Read it back
curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/schedules" \
-H "Authorization: Bearer $SYLPHX_API_KEY"curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/schedules/$SCHEDULE" \
-H "Authorization: Bearer $SYLPHX_API_KEY"The list names every Schedule of the environment, and a read answers one with
its spec and status. Schedules is what the tick
states mean.
3. Pause and resume
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/schedules/$SCHEDULE:pause" \
-H "Authorization: Bearer $SYLPHX_API_KEY"A paused Schedule starts nothing until :resume, and a resume follows the
catch-up window for what was missed.
4. Remove it
Remove the schedule from the row, or the row itself, and release: the
Schedule is retired. A Schedule a manifest no longer declares can also be
removed with DELETE on its name.
Where the CLI fits
sylphx workflows schedules list|get|pause|resume|delete print the same calls.