Knowledgebase

My Cron Job Runs but Nothing Happens Print

  • cronjobsscheduledtasks, cron, wordpress, php, email, errors, permissions, redirects
  • 0

The job fires and has no effect.

WHAT THIS USUALLY MEANS

The command runs and the script fails, or runs in the wrong context.

WRONG WORKING DIRECTORY

Cron does not run from your web directory.

A script expecting to find files relative to itself may not.

WRONG PHP VERSION

The script runs under a different version from your website and fails.

Specify the correct binary.

MISSING ENVIRONMENT

Scripts relying on environment variables set by the web server do not have them under cron.

PERMISSIONS

The script may not be readable or executable by the user cron runs as.

HOW TO SEE WHAT HAPPENED

Enable output by email, or redirect output to a log file.

The error will be there.

FOR WORDPRESS SPECIFICALLY

Check the HTTP method is actually disabled in wp-config.php.

If both are active, behaviour is confusing.


Was this answer helpful?
Back

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


Trustpilot