Retries, time limits and other job options
Every schedule has options for how its runs behave: where they start, what they're allowed to use, and what happens when they fail or overlap. The defaults suit most tasks. This article explains each option so you can change the ones that matter for yours.
Find the options
- Open Account → Hosting → your site → Schedules.
- Click Edit on a schedule, or New schedule for a new one.
- Open Advanced options.
- Change what you need, then click Save schedule.
All options at a glance
| Option | Default | Choices |
|---|---|---|
| Working folder | Your home folder | Any folder in your account |
| Environment variables | None | Up to 64 names and values, each value up to 4 KB |
| Time limit | Your plan's longest run | 1 second up to your plan's longest run |
| Retries | Off | 0 to 10 tries, with a growing wait between them |
| If still running | Skip | Skip, Queue or Replace |
| Priority | Low | Low or Normal |
| Memory limit | Your plan's limit | Up to your plan's limit per run |
| Run after | None | Up to 5 other schedules |
| Catch up missed runs | Off | Off, or the last 1 or more runs, up to your plan's cap |
| Logs to keep | 20 | How many runs' output to keep for this schedule |
Your plan's numbers are in Schedule limits by plan.
Working folder
Runs start in your home folder unless you choose another. Pick the folder your script expects, such as shop for a Laravel app in ~/shop. The folder must be inside your account.
Environment variables and secrets
Add a name and value for each setting your task reads, such as APP_ENV with the value production.
- Names use capital letters, numbers and underscores, and start with a letter or underscore, such as
MAIL_HOSTor_TOKEN. - You can add to
PATH, but not replace it. You can't setHOMEor names starting withLD_. - Turn on Secret for passwords and keys. A secret's value shows as
••••after you save, never appears in run history, and is replaced with[redacted]anywhere it shows up in a run's output.
APP_ENV production
MAIL_HOST mail.example.ca
MAIL_PASSWORD •••• (Secret)
Tip: Secret values of 6 or more characters are hidden in output. Shorter values can't be told apart from ordinary text, so use longer secrets.
Time limit
A run that goes past its Time limit is asked to stop. If it hasn't stopped 10 seconds later, it's ended. The run shows as Timed out.
Set the limit a little above how long the task usually takes. Your history shows each run's duration, so you can check.
Retries
When a run fails, retries try it again after a wait. Each wait is longer than the last, so a short outage elsewhere has time to clear.
| Setting | Means |
|---|---|
| Tries | How many extra tries after the first run, 0 to 10 |
| First wait | How long before the first retry |
| Grow by | How much longer each wait is than the one before |
| Longest wait | The cap on any single wait |
With First wait 10 seconds, Grow by 2 and Longest wait 5 minutes, the retries wait about 10 s, 20 s, 40 s, 80 s and so on, never more than 5 minutes. Each wait varies by up to 10% either way, so many schedules retrying at once don't all start together.
A run counts as failed when it ends with an exit code other than 0, times out, runs out of memory, or, for a web address, gets an error answer. Retries show in history as Retry, with the try number.
If still running
This decides what happens when a run is due but the last one hasn't finished.
| Choice | What happens | Good for |
|---|---|---|
| Skip | The new run doesn't start, and history records it as Skipped | Most tasks. A queue or import that picks up where it left off |
| Queue | The new run waits and starts when the last one ends. Up to 3 can wait | Tasks where every run must happen, such as one per uploaded file |
| Replace | The running one is stopped, then the new run starts | Tasks where only the newest run matters, such as refreshing a cache |
Schedules that repeat faster than every 10 seconds can use Skip or Replace, but not Queue.
Priority
Low runs your task behind your website's pages, so a heavy job slows visitors down as little as possible. Normal gives it the same share as your pages. Use Normal only for short tasks that must finish quickly.
Memory limit
The scheduler checks each run's memory twice a second, counting every program the run starts. A run that goes over the limit is asked to stop, and ended 10 seconds later if it hasn't. The run shows as Out of memory.
All your runs, sites and other processes share your account's resources. See Resource limits explained.
Run after another schedule
Run after starts this schedule when another one finishes, instead of, or as well as, at set times.
- Under Run after, pick the schedule to follow.
- Choose when: When it works, When it fails or Either way.
- To run only after the other schedule, with no times of its own, turn on No schedule of its own.
| Example | Set up |
|---|---|
| Build a report after the import finishes | Build report runs after Product import, When it works |
| Tell the team when the import breaks | Send import warning runs after Product import, When it fails |
| Clear temporary files after every import | Clean up runs after Product import, Either way |
A schedule can follow up to 5 others. The form won't save a loop, such as A after B and B after A. Runs started this way show in history as After another job.
Catch up missed runs
Runs can be missed when the scheduler was stopped, for example while your account was suspended. Catch up missed runs decides what happens next.
| Setting | What happens |
|---|---|
| Off | Missed runs show in history as Missed, and the schedule carries on from the next time |
| Last 1 | The most recent missed run happens as soon as the scheduler is back |
| Last 5 | Up to the 5 most recent missed runs happen, one after another |
Turn it on for daily or weekly tasks that mustn't be skipped, such as a nightly export. Leave it off for frequent tasks, where the next run does the same work. Catch-up runs show in history as Catch-up.
Pausing a schedule isn't a missed run. When you resume, it starts from now.
Stop after a date or a number of runs
Add until or count to the schedule on the Advanced tab. every 1m; until 2027-01-31 stops at the end of January, and every 10m; count 12 stops after 12 runs. See Schedule expressions reference.
If something goes wrong
| Problem | Fix |
|---|---|
| A secret shows in output | It's shorter than 6 characters, or the program changed it, such as printing it in parts. Use a longer secret, and don't print secrets |
| Runs show Timed out but work over SSH | Over SSH there's no limit. Raise Time limit, or split the work into smaller runs |
| Run after never starts | Check the other schedule's result matches When. A skipped run doesn't count as working or failing |
| Queue drops runs | Only 3 runs can wait. Runs past that are recorded as Skipped |
| Catch-up didn't run anything | It only applies when the scheduler was stopped. Paused time isn't caught up |
Still stuck? Ask us and we'll walk you through it.
