Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRON check is incorrect #959

Closed
khromov opened this issue Jan 10, 2018 · 4 comments · Fixed by #1029
Closed

CRON check is incorrect #959

khromov opened this issue Jan 10, 2018 · 4 comments · Fixed by #1029

Comments

@khromov
Copy link
Contributor

khromov commented Jan 10, 2018

Before showing the "WP Cron Tracking" option in the admin, Stream checks if DISABLE_WP_CRON is not true.

I don't think this is a correct condition to check. DISABLE_WP_CRON doesn't actually disable CRON, it just stops it from running during normal requests. CRON still runs when manually loading /wp-cron.php.

The check should be removed, as WP CRON can never be truly disabled.

@DavidCramer
Copy link
Contributor

@khromov I think you are correct. DISABLE_WP_CRON is really a check to see if the user had disabled page load based cron, which is disabled if you have a server side ping set up.

I'll see what can be done to make this work as expected.

@DavidCramer
Copy link
Contributor

@khromov Having thought this through, I believe that how it is now is in fact the correct way to do it.
When you define DISABLE_WP_CRON, you are telling WordPress to not use spawn_cron()

The wp-cron.php file you mention is the file used when you want to control the cron manually via your own method, as indicated in the files header in wp-cron.php :

Defining DISABLE_WP_CRON as true and calling this file directly are
mutually exclusive and the latter does not rely on the former to work.

@kasparsd
Copy link
Contributor

I think the option to track cron events shouldn't be tied to the state of DISABLE_WP_CRON since that applies to the front-end CRON feature only and not cron jobs in general.

@kasparsd
Copy link
Contributor

Version 3.4.1 has been released, thanks for reporting the issue @khromov!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants