My "Post Expirator" WordPress plug-in requires that wp_cron be running on my server. The WordPress codex describes two entries that I can add to my wp-config.php file:

define( 'DISABLE_WP_CRON', false );   and   define( 'WP_CRON_LOCK_TIMEOUT', 60 ); 

I am concerned because my wp-config.php file has NO entries for WP_CRON, so I fear that is by design, and if I add those lines to wp-config.php my server will fill up or seize up or worse. This server is our company intranet so is not public-facing, if that makes a difference.

Just upgraded two months ago (via TKLBAM, works great) so on version 14.x

Thank you in advance for any advice.

Lisa

Forum: 
Tags: 
Jeremy Davis's picture

There should be no issue re-enabling WP-cron as far as I'm aware. It's just not as good as "normal"/"proper" (i.e. Linux system) cron. FWIW a system cron job to run the WP cron jobs is configured and enabled in the TurnKey WordPress appliance by default.

If you're not already aware of the difference between system cron and WP-cron, or the downside of WP-cron, then I suggest that you have a bit of a read about it. I just did a quick google and found this and this which give a pretty good outline.

TBH, if I were you, I'd be checking whether those plugins really need WP-cron. I may be wrong, but I suspect that they just mean that you need (some sort of) cron enabled. Perhaps most of their usual users are on shared hosting (where it's not possible to enable system cron)? Our pre-configured cron job triggers the wp-cron.php file, every 15 minutes. I'm no WP expert, but I would imagine that that should do the job?!

If you do choose to push ahead and enable WP-cron, then I strongly suggest disabling the system cron job we preconfigure. My guess is that they would clash.

Thank you Jeremy, I use regular (system) cron for some scripts that have to run on a schedule so I don't want to introduce a conflicting cron ... I will read up on what you advised above.

Thanks again, appreciate the expertise.

Jeremy Davis's picture

You're probably already aware of this, but just to make sure I'm being completely clear: If you enable WP-cron, you just need to disable the default WordPress system cron job that we pre-configure. Your other cron jobs will likely be fine to leave there. Obviously I can't 100% guarantee that, so please make sure that you do some testing first.

Good luck with it. :)

Add new comment