Cron jobs
Schedule a command to run on an environment, pause or delete it, and read the result of its last run.
Cron jobs run a command on an environment on a schedule. Open your site, then Cron, to add one, pause it, or read what happened the last time it ran.
Open it
- Open a site and pick the environment in the top bar.
- Choose Cron.
The list shows each job with its schedule and the result of its last run.
Add a cron job
- Choose Add cron job.
- Pick when it runs. Use the schedule builder for common times, or switch to the cron expression field for anything else.
- Enter the command.
- Save.
A job can run at most once every 5 minutes. Avaloi refuses a faster schedule and tells you why.
Pause and resume
Pause a job from its switch or its menu. A paused job keeps its schedule and command but does not run. Flip the switch again to resume it.
Read the last run
Open a row to see the last run: the exit code, the output, and when Avaloi removes that output. Avaloi keeps the output for 7 days.
Delete a cron job
Delete from the job's menu. Delete asks you to type the job's description to confirm.
Limits
- Fastest schedule: once every 5 minutes.
- Output of the last run is kept 7 days.
Quick answers
Avaloi refused my schedule. The schedule runs more often than every 5 minutes. Choose a slower one. Through the API, the request returns 422 with an explanation.
Does a cron job run on staging too? Cron jobs belong to one environment. Pick the environment in the top bar before you add one.
Where is the output of a run from last month? Avaloi keeps output for 7 days. Older output is gone.
API
GET /v1/environments/{id}/cronPOST /v1/environments/{id}/cronPATCH /v1/environments/{id}/cron/{cron_id}DELETE /v1/environments/{id}/cron/{cron_id}
Related
Still stuck?
Email [email protected] with your site name and what you tried, or send us a message.