jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Wrong warning: The WordPress CRON jobs system is disabled.

Open mahnunchik opened this issue 4 years ago • 7 comments

I've faced with incorrect warning:

The WordPress CRON jobs system is disabled. This means the garbage collection system will not work unless you run the CRON system manually.

Yep, the variable DISABLE_WP_CRON set to true. But cron works through system cron https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/#macos-and-linux

How to remove incorrect warning?

mahnunchik avatar Apr 06 '20 16:04 mahnunchik

Hi @donnchawp How to hide incorrect warning?

mahnunchik avatar Apr 27 '20 09:04 mahnunchik

I think the warning should stay but it should be possible to dismiss it. Some users will have hosts that have the cron system disabled entirely and they'll wonder why garbage collection isn't working.

On the other hand, if it's dismissable, the user may forget that cron is disabled and wonder why their garbage collection has stopped working.

donnchawp avatar Aug 02 '20 16:08 donnchawp

For example I have system cron set up: https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/

It requires to set: define('DISABLE_WP_CRON', true);

mahnunchik avatar Aug 02 '20 16:08 mahnunchik

@donnchawp said:

I think the warning should stay but it should be possible to dismiss it.

It is not dismissible yet, unfortunately. I am in the same boat, WP cron is disabled but I have system crons running instead for improved performance. This error reported by Super Cache is misleading.

image

d19dotca avatar Mar 27 '21 18:03 d19dotca

I recommend adding a checkbox in the plugin settings "This site is using real cron in conjunction with define('DISABLE_WP_CRON', true), please disable the CRON warning". This would show consideration towards your power users.

d-packs avatar May 25 '22 21:05 d-packs

Any news?

mahnunchik avatar Aug 12 '22 19:08 mahnunchik

This issue has nothing to do with Super Cache. However if moving it to this component solves it faster I'm game.

d-packs avatar Aug 13 '22 05:08 d-packs

This issue has nothing to do with Super Cache. However if moving it to this component solves it faster I'm game.

Well for me it has a bit to do with Super Cache because I never get the error until I install Super Cache on any site. I suppose you're saying all Super Cache is doing to expose it is implementing garbage cleanup, thereby exposing an erroneous error inherent in Wordpress? I've used another caching plugin with garbage cleanup and not noticed the error (but I need to do free now) , so does that suggest they had solved it on a plugin level, as might W Super Cache?

JeffBurris avatar Sep 03 '22 04:09 JeffBurris

This issue only occurs for me when using Super Cache. In fact, the only place the error string appears (The WordPress CRON jobs system is disabled. This means the garbage collection system will not work unless you run the CRON system manually.) is in Super Cache's main wp-cache.php plugin file. We, too, are using a system CRON setup for performance, and our client thinks there's something wrong with her site, where it's just this erroneous error.

gaswirth avatar Jan 20 '23 19:01 gaswirth

I suppose you're saying all Super Cache is doing to expose it is implementing garbage cleanup

I'm saying I experienced the issue without having SuperCache installed. I'm not using that plugin at all.

d-packs avatar Jan 20 '23 23:01 d-packs

why is this being addressed to me, I haven't commented about this other than reporting what happens on my setup. I knpow nothing about how garbage cleanup works and would not claim to. I don't remember subscribing to this thread and amd receiving no other messages...


From: Ionut @.> Sent: Friday, January 20, 2023 6:01 PM To: Automattic/jetpack @.> Cc: JeffBurris @.>; Comment @.> Subject: Re: [Automattic/jetpack] Wrong warning: The WordPress CRON jobs system is disabled. (#25477)

I suppose you're saying all Super Cache is doing to expose it is implementing garbage cleanup

I'm saying I experienced the issue without having SuperCache installed. I'm not using that plugin at all.

— Reply to this email directly, view it on GitHubhttps://github.com/Automattic/jetpack/issues/25477#issuecomment-1399050808, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASBSQTCHXLPBTOAJ7MRKKVLWTMKNRANCNFSM56MMYACQ. You are receiving this because you commented.Message ID: @.***>

JeffBurris avatar Jan 22 '23 01:01 JeffBurris

@JeffBurris When you comment on a GitHub issue, you are automatically subscribed to all updates on that issue. If you'd rather not receive updates for each comment here, I would recommend clicking on the "Unsubscribe" button in the sidebar of the issue page.

jeherve avatar Jan 23 '23 09:01 jeherve

I don't think we even need to go so far as to have a checkbox in the plugin (although I wouldn't complain if such a thing existed). I think just having the user set another variable similar to DISABLE_WP_CRON would be sufficient. eg. having something likeOS_CRON_CONFIGURED manually set to true by the administrator.

This way, it's a trivial matter of adding a single if statement to wp-cache.php, which would hopefully allow this issue to be resolved very quickly.

boltronics avatar Feb 09 '23 05:02 boltronics

Would be wonderful if this warning can be turned off by a constant for all of us which run the cron from the system cron (I use wp-cli on linux system cron for example for this).

madalinignisca avatar Aug 18 '23 13:08 madalinignisca