PHP 7.4 Disable WP Cron

YeOldeOke

Senior Member
Joined
May 21, 2012
Messages
843
Reaction score
24
Location
Pretoria
Since I upgraded WP to 5.8.1 my cron jobs ain't running. Comes up with

There was a problem spawning a call to the WP-Cron system on your site. This means WP-Cron events on your site may not work. The problem was:

cURL error 28: Connection timed out after 3004 milliseconds

After much soul-searching and digging, I decided the best solution is to disable WP scheduling and just run a cron job from the server (on PHP 7.4)

So the good folk all over the internet advised me to disable it in wp-config with define('DISABLE_WP_CRON', 'true');

Is great, yes? Server faster an' all.

Then I made the mistake of looking in the server error logs.:sick:

Zillions of Use of undefined constant ...DISABLE_WP_CRON... - assumed '...DISABLE_WP_CRON...' (this will throw an Error in a future version of PHP)

Just a friendly notice that IN FUTURE it will throw an error. Pages of friendly notices.

So anyone any idea how to disable WP cron on PHP 7.4, I can find nothing about it anywhere?
 
you've probably copy/pasted from a website, and it has used quotes characters that are not valid PHP strings
 
Top
Sign up to the MyBroadband newsletter
X