Skip to content

Cron job is not running

Work out whether WordPress cron or one of your cron jobs is late or failing, read the cron log and the last error line, and fix the schedule or the command.

WP Waterfall runs WordPress cron and your cron jobs from the server, never on page loads. Start with the status on the Cron tab and the lines in cron.log. Limits, statuses, and setup are in Cron jobs.

How do I find the cause?

  1. Decide which cron you mean. WordPress tasks such as scheduled posts run every 15 minutes on live, so a task can start up to 15 minutes late. Staging and preview have WordPress cron off until you add a job that runs cron event run --due-now there.
  2. Read the status. Last run failed shows the last error line. Missed a run names the time the run was due. Not allowed says why the command is refused. A WordPress cron card that says Failing or Not running means WordPress cron itself has a problem.
  3. Open the cron log. Open Logs and pick cron.log. Each run has a line with its exit code and duration. skipped, the previous run is still going means the job runs longer than its schedule, so use a slower one. stopped after ... the run took too long means it hit the run limit.
  4. Open the last run. Choose Run output in the row's menu for the exit code and the full output. A nonzero exit code means the command failed, and the output says why. Output is kept 7 days.
  5. Check the pause switch. A paused job never runs. Resume it from its row, or call PATCH /v1/environments/{id}/cron/{cron_id}.
  6. Check the environment. Jobs belong to one environment. Use the environment switcher to confirm you are looking at the right one. Jobs on live are not copied to staging.
  7. Check the schedule. Times use UTC. A job set for one day of the month looks idle for weeks.
  8. Read php-error.log. A fatal error from a plugin that the command loads shows there, even when the cron output is short.

How do I fix it?

  • The job is paused. Resume it.
  • The exit code is not zero. Fix the command. Run it under Tools, then WP-CLI, without the wp prefix. Both places use the same allowlist, so a command refused there is refused in cron.
  • The status is Not allowed. Edit the job to an allowed WP-CLI command. Older jobs that ran a php script or a shell line stay in the list but never run. Replace or delete them.
  • The schedule was refused. Pick every 5 minutes or slower, or correct the cron expression.
  • The job is on the wrong environment. Add it on the right one, then delete the old one.
  • WordPress cron is more than 15 minutes late on live. Look for a paused job that runs cron event run. It replaces the built-in run, so resume or delete it.
  • The WordPress cron card says Not running. WP Waterfall repairs it on its own and tells support if that fails. If it persists, message Nami from the chat button.

Still stuck

Message Nami from the chat button with the site name, the environment, the request ID or job ID, the job's description and schedule, the exit code and output of the last run, and the cron.log lines around the expected time.

Still stuck?

Email support at wpwaterfall dot com with your site name and what you tried, or send us a message.