DocsRun your app
Cron jobs
Run a command on a schedule, from every 5 minutes to every week or on a cron expression, on a machine of its own. The app can sleep in the meantime.
Use with AI
A cron job is one command that your app runs on a schedule (cron is the old Unix name for it): a nightly cleanup, a report every hour, a sync every five minutes. Each run happens on a machine of its own, made from the version of the app that is live, and removed when the command ends. The app itself is not involved: it can sleep, and a job runs once however many replicas there are.
Add a job
Section titled “Add a job”Open the app, Settings, Cron, Add cron job:
| Field | What to enter |
|---|---|
| Name | What the job does, for the list and the notifications. Control and invisible characters are refused |
| Command | One line, run from the root directory of the app, such as node jobs/cleanup.js or npm run report. A script in your repository can hold more |
| Runs | How often, see Schedules |
The dialog says what a run costs before you save: a machine of the app’s size while the command runs, counted by the second. A job starts switched on; its first run is at the next moment the schedule names.
Schedules
Section titled “Schedules”All times are UTC. Jobs run at most every 5 minutes: each run starts a machine.
| Runs | When |
|---|---|
| Every 5, 10, 15 or 30 minutes | On the minutes of the hour that divide by it: every 15 minutes runs at :00, :15, :30 and :45, whenever the job was made |
| Every hour | On the hour |
| Every day | At the time you choose |
| Every week | On the day and at the time you choose |
| Custom (cron expression) | On the moments a cron expression of your own names |
Cron expressions
Section titled “Cron expressions”A cron expression has five fields, separated by spaces: minute, hour, day of the month, month and day of the week.
| Expression | Runs |
|---|---|
0 */6 * * * |
Every six hours, on the hour |
30 9 * * 1-5 |
At 09:30 on weekdays |
0 0 1 * * |
At midnight on the first day of each month |
0,30 8-18 * * * |
Every half hour from 08:00 to 18:30 |
As you type, the dialog shows the next three runs the expression names, so you can see that it means what you wanted. An expression that cannot be read, or that names a day that never comes (such as the 31st of February), is refused and the reason is shown. Macros such as @daily and a sixth field for seconds are not accepted.
Runs of one job are at least 5 minutes apart. An expression that would start two runs closer than that, such as */2 * * * *, 0-4 * * * * or 58,2 * * * *, is refused with “Jobs run at most every 5 minutes.” */5 * * * * and 0,55 * * * * are accepted.
How a run works
Section titled “How a run works”- On a machine of its own. Each run starts a fresh machine of the size and region of the app, from the image of the live version, with the app’s environment variables. Replicas of the app are not touched, and a sleeping app stays asleep.
- Once. However many replicas the app has, a schedule starts one run.
- Without root rights, like the app itself. The command can write in the folder of the app, in the home folder and in
/tmp. Nothing it writes is kept: the machine is removed when the run ends. Data belongs in a database or a store outside the app. - In the folder of the app, or inside
buildfor an AdonisJS app, where the build writesace. - For up to 15 minutes. A run that takes longer is stopped with “The job did not finish within 15 minutes and was stopped.”
- As a script that starts with
set -e. A part of the line that fails ends the run with its exit code:false; echo okends with exit code 1 and prints nothing. The shell and the time limit are started by their full path, so aPATHvariable of yours changes which programs your command finds, not how it is started or stopped. - With its output kept. The job page shows every run with its status, its exit code, how long it took, and what the command printed (the last 64 KB; earlier lines are replaced by “[earlier output left out]”). The last 50 runs of a job are kept. Where the output holds the value of one of the app’s variables, it shows
[hidden]in its place.
Who can add a job
Section titled “Who can add a job”The owner and the admins of the team add, change, switch on and off, and run cron jobs. A member sees the jobs and their runs, and may remove a job that has no run going; the page says “Only team admins can add, change or run cron jobs.” See Teams.
When a run is skipped
Section titled “When a run is skipped”A run is written down as skipped, with the reason, when:
| Reason | What to do |
|---|---|
| The previous run had not finished | Nothing. Runs do not pile up; the next one starts on schedule once the earlier one has ended. Give a slow command a longer interval |
| The app is paused | Resume the app |
| No version is deployed yet | Deploy the app once |
| The plan does not allow running apps | Choose a plan under Team settings, Billing |
| Builds are paused for maintenance right now. Try again in a little while. | Nothing. Runs start again on schedule once builds resume |
| The team’s cron jobs started … runs in the last hour, the most allowed in an hour. | Wait: runs start again as the hour moves on. Run frequent jobs less often, or choose a plan with more runs an hour, see Limits |
When runs are skipped for the runs of the hour, the team gets the notification Plan limit reached (“Cron job … of … did not run: …”), at most once an hour however many runs are skipped.
Run it now
Section titled “Run it now”Run now on the Jobs page starts a run at once, outside the schedule, for example to try a new command. It appears in the list like any other run, and counts towards the team’s runs of the hour.
When a run fails
Section titled “When a run fails”A run fails when the command ends with an exit code other than 0, runs out of memory, or is stopped after 15 minutes. The team gets the notification Cron job failed with the reason; which channels receive it is set under Team settings, Notifications. The output of the run is on the job page.
Turn off, change, remove
Section titled “Turn off, change, remove”Each job can be switched off and on, changed, or removed from the Jobs page. A job that is switched off keeps its runs but has no next run. Changing the schedule moves the next run to the next moment the new schedule names. Removing a job removes its runs too. A run that is still going is stopped: the page says “Cron job removed. Its run that was still going was stopped.” Only the owner and the admins can remove a job while it has a run going.
What it costs
Section titled “What it costs”A run is counted like a replica: by the second, at the price of the app’s size and region, only while the command runs. Nothing is counted between runs. Because a job does not need a running replica, an app with jobs can still sleep when it is idle.
A run uses the size the live version of the app runs at: a new size you saved waits for the next deployment, for jobs as for replicas. On the bill, runs are not part of the app’s compute: they are on the line Jobs and commands, at the size each run used, outside the compute cap shown under Scaling. See Billing.
Limits
Section titled “Limits”- 10 jobs per app.
- At most one run every 5 minutes per job.
- Runs started in an hour, across all the apps of the team, by schedule or with Run now: 60 on Hobby and during the trial, 200 on Pro, 600 on Business. Runs past that are skipped, see When a run is skipped.
- 15 minutes per run.
- The last 50 runs of a job are kept, with the last 64 KB of output each.
Jobs inside the app
Section titled “Jobs inside the app”A timer, a cron package or a queue worker inside the app runs only while a replica of the app runs, and on every replica that runs. An app that does its scheduled work this way needs Keep one replica always on under Scaling, and a lock in your own code when it has more than one replica. For work that should happen on a schedule, once, without a visitor, a cron job is the simpler choice. For a queue worker or any command that keeps running, add a worker: it runs on a machine of its own, is started again when it stops, and can stop when the queue is empty. See Sleep and wake.
© 2026 Orbit