Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

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.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

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?

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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?

  1. List what stoppedWrite each task that stopped, what it should do and the last date it worked.
  2. Check for damageAsk whether anything depended on it: missed backups, unsent invoices, expired subscriptions. Note which, so they can be caught up.
  3. 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.
  4. 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.
  5. 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?

  1. 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.
  2. 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.
  3. 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.
  4. 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

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.