Help for owners
My scheduled tasks stopped running (reports, reminders, backups)
Short answer
Scheduled tasks on a Linux server run through cron, which runs quietly and shows no error unless set up to. They stop when the server was rebuilt, the user or path changed, the script fails, or the output mail goes nowhere. Do not edit the schedule yourself; write down which task stopped and since when.
Does this sound like your situation?
- Daily emails, reports or reminders stopped arriving.
- Nightly backups or clean-ups have not run, and nobody noticed for days.
- Subscriptions or invoices that should be created automatically are missing.
- It stopped after the server was moved, upgraded or rebuilt.
- Running the task by hand works, but it never runs by itself.
Why does this happen?
Cron runs jobs under one user with a very plain setup
The crontab manual says cron runs each command under the account that owns the crontab, checks entries every minute and sets SHELL to /bin/sh by default. A command that depends on settings from a normal login can fail under cron.
Confirmed by man7.org
Failures are mailed to nobody
The manual says output is mailed to the crontab owner, or to MAILTO if it is set, and no mail is sent if MAILTO is set but empty. On most servers no one reads that mailbox, so a failing job is silent.
Confirmed by man7.org
The server was rebuilt or moved and the schedule was left behind
The list of scheduled tasks lives on the server. A new server, a restored backup or a changed user account does not carry it over unless someone copies it.
The script itself now fails
A password changed, a disk filled up, or a software upgrade removed something the script uses. Cron starts it every time and it fails every time.
Technical detail: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted
The schedule lives in the app, behind one cron line
Many apps run a single cron entry that triggers their own scheduler. If that one entry is missing or broken, every scheduled task in the app stops together.
What can I do about it today?
- List what stoppedWrite each task that stopped, what it should do and the last date it worked.
- Check for damageAsk whether anything depended on it: missed backups, unsent invoices, expired subscriptions. Note which, so they can be caught up.
- Do not run them all by hand at onceRunning a month of missed tasks together can send duplicate emails or charge twice. Ask your developer which are safe to run.
- Do not edit the server's schedule yourselfA wrong line can run a task every minute or delete the wrong thing. Leave edits to someone who can test them.
- Ask who has server accessFind out who can log in to the server today, and send that person the list.
When should I bring someone in?
- The missed task is a backup, a payment run or a customer message.
- The server was changed recently and nobody knows what ran on it before.
- You have no one with access to the server.
How do I handle it?
- Read the schedule and the logsI look at what is scheduled, under which user, and what the system and the script logs say about the last runs.
- Find the first failureI locate the day the task stopped and match it to a change: a move, an upgrade, a password or a full disk.
- Repair and catch up safelyI fix the cause, test the task by hand, then run the missed work in a controlled way so nothing is sent twice.
- Make failures loudEach important task reports success or failure to an address you read, and a missing run raises an alert.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Will cron catch up on jobs missed while the server was off?
The crontab manual does not describe any catch-up. I treat missed runs as lost and run them deliberately.
Why did nobody get an error?
Cron reports errors by mail to the crontab owner, which is rarely read. Alerts have to be set up on purpose.
Is this the same as stuck background jobs?
No. This is about tasks that start on a schedule. Jobs waiting in a queue are covered on the queue page.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.
For your developer: the technical fixes
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/app/import.php on line 42PHP stops the script after 30 secondsWarning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missingPHP mail() returns true but the email never arrivesFATAL: could not write lock file "postmaster.pid": No space left on deviceThe Postgres container cannot write postmaster.pid because Docker is out of disk