Cloud & Operations · Practical News

Scheduled Jobs Not Running: Usually the Environment

Source: Paddy Dance teamKeywords: crontab not running troubleshooting

Confirm cron is running

Check the service: systemctl status cron or crond depending on distribution. If the service is down, nothing else matters.

Check system logs: /var/log/cron, /var/log/syslog or journalctl -u cron shows each scheduled run and its errors.

Three failure classes

Paths: calling php script.php instead of /usr/local/bin/php /full/path/script.php. Cron cannot find the binary.

Permissions: the script is not executable, or the running user cannot write to the target directory.

Syntax: wrong field count, or an unescaped percent sign, which has special meaning in crontab and must be written as \%.

Make the job leave evidence

Redirect output inside the crontab entry: command >> /var/log/mytask.log 2>&1. Without it, failures are silent.

Start scripts with set -e and log a start timestamp so you can tell whether it did not run or exited midway.

FAQ

Do I restart cron after editing crontab?

No. Saving reloads it automatically. If changes do not take effect, check whether you edited a different user crontab.

Why is the timing wrong?

Check the server timezone and the timezone cron uses. Containers often default to UTC, which looks like the job never ran.

The job runs but nothing happens. Why?

Usually an error swallowed inside the task. Add log redirection and read the output before changing logic.

Related questions

cron PATH environmentwhere are cron logscheck crontab syntaxcron runs manually but not scheduled

Further reading

Sources & References

The following are public sources. Always check the latest requirements on the official authority or platform page.

Explain your case first, then confirm the scope

Tell us your entity, business model and current progress. We will confirm what we can assist with and what you need to do before discussing fees.