Knowledgebase

Cron job not running or producing errors Print

  • cron, wordpress, php, cpanel, firewall, wpcron, redirects, guide
  • 0

Scheduled tasks failing.

FIRST, CONFIRM IT IS SET

cPanel > Cron Jobs. Check the entry exists and the schedule is what you expect.

CHECK THE COMMAND

Use full paths. Cron runs with a minimal environment and does not know where php or your script live.

/usr/local/bin/php is the usual path on our servers.

TEST IT MANUALLY

Run the exact command over SSH. If it fails there, it will fail in cron, and you will see why.

CAPTURE THE OUTPUT

Rather than discarding output, redirect it to a log file while testing.

Without that, a failing job fails silently.

THE WORDPRESS CASE

HTTP requests to wp-cron.php are blocked on our servers.

WordPress needs DISABLE_WP_CRON set in wp-config.php and a real cron job, or nothing scheduled ever runs.

If several scheduled things are broken, this is almost always why.

EVERY-MINUTE SCHEDULES

Avoid unless genuinely needed. They consume resources continuously.

ORPHANED JOBS

Remove cron entries for software you have deleted. They keep running and generating errors.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot