Skip to main content
Cron triggers run scheduled work for one Service. Use Cron for cleanup, reports, polling, cache refreshes, and maintenance jobs that are safe to retry.

Scheduled job flow

1

Enable Cron for the Service

Set cron = true in tovuk.toml before relying on scheduled Rust worker jobs for that Service.
2

Implement the internal handler

Handle POST /.tovuk/cron/<trigger> in the Rust worker. Keep the handler idempotent because scheduled delivery can overlap with retries or manual agent actions.
3

Create the UTC trigger

Create a named trigger with a UTC cronExpression.
tovuk cron create --service service_1 nightly "0 0 * * *" --json
4

Inspect the first delivery

After the first scheduled run, inspect runtime logs for the Service.
tovuk logs --service service_1 --json
5

Pause, update, or remove safely

Pause or update a trigger before changing handler assumptions. Delete stale triggers when the scheduled job is retired.

CLI workflow

tovuk cron create --service service_1 nightly "0 0 * * *" --json
tovuk cron update --service service_1 nightly "*/15 * * * *" --json
tovuk cron disable --service service_1 nightly --json
tovuk cron enable --service service_1 nightly --json
tovuk cron delete --service service_1 nightly --json

Dashboard

Dashboard Cron controls are available at https://tovuk.com/account/resources and https://tovuk.com/<handle>/resources. The Resources view can create, update, pause, resume, and delete Cron triggers through the same API routes as the CLI.

API

  • POST /v1/services/{service_id}/cron
  • PUT /v1/services/{service_id}/cron/{trigger}
  • DELETE /v1/services/{service_id}/cron/{trigger}
Cron deliveries are Rust worker routes at POST /.tovuk/cron/<trigger>. Public traffic to /.tovuk/* is blocked.

Meters and caps

Cron delivery counts as Worker usage because it wakes and runs the Rust worker. Use worker_requests, worker_cpu_ms, and worker_transfer_bytes caps.
tovuk limits set worker_requests --period day --value 100000 --notify-at-percent 80 --json
tovuk limits set worker_cpu_ms --period day --value 1000000 --notify-at-percent 80 --json

Rules

  • Cron handlers must be idempotent.
  • Cron handlers must tolerate retries and overlapping manual agent actions.
  • Cron handlers have a 15 minute wall-clock limit.
  • Keep long fan-out work in Queues.
Last modified on June 3, 2026