Cron jobs
A Cron job runs a command in a fresh container on a schedule. Add Nodes ▾ → Compute → Cron job and set:
| Field | Default | Notes |
|---|---|---|
| Schedule | */5 * * * * |
Five fields: minute, hour, day, month, weekday. @hourly, @daily, @weekly, @monthly also work. |
| Image | alpine |
Any image with the tools you need, for example postgres:17-alpine for pg_dump |
| Command | echo hello |
Run with sh -c |
The panel reads the schedule back in plain English with the next three run times, so you can check it.
Link the cron job to a database, bucket or app and it gets the same variables an app would. For example, a nightly Postgres dump to object storage, with the job linked to both nodes:
apk add --no-cache aws-cli && \pg_dump "$DATABASE_URL" | gzip | \aws --endpoint-url "$S3_ENDPOINT" s3 cp - "s3://$S3_BUCKET/backups/db-$(date +%F).sql.gz"Schedule: 0 3 * * *. Image: postgres:17-alpine.
nightly-backup
ok
last run 03:00
0 3 * * *
db
running
Postgres
DATABASE_URL
backups
running
Object storage
S3_*
Limits
Section titled “Limits”- Each run gets 512 MB and 1 CPU and is stopped after 5 minutes.
- The Overview tab shows the last run, its result and the last 4,000 characters of output.
- Sleeping services the job is linked to are woken for the run.
- Cron jobs don’t count towards your memory and CPU quota.
To read another app’s files (for example to back up its SQLite database), see Sharing an app’s data.