Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In a Wordpress 3.5.1 the apache log generates the following error related to wp-cron.php:

[18/Jun/2013:10:53:21 +0200] "POST /wp-cron.php?doing_wp_cron=1371545601.7393701076507568359375 HTTP/1.0" 200 211 "-" "WordPress/3.5.1; http://www.foo.com" [18/Jun/2013:10:54:36 +0200] "POST /wp-cron.php?doing_wp_cron=1371545676.3652250766754150390625 HTTP/1.0" 200 211 "-" "WordPress/3.5.1; http://www.foo.com" [18/Jun/2013:10:56:44 +0200] "POST /wp-cron.php?doing_wp_cron=1371545804.4974770545959472656250 HTTP/1.0" 200 211 "-" "WordPress/3.5.1; http://www.foo.com"

...

More than 700 petitions per hour like this are made and I do not have any Cron plugin.

I think if I insert the following code in wp-config.php it will desactivate this cron:

define('DISABLE_WP_CRON', true);

I would like to confirm this and ask about what possible pernicious secondary effects this could have.

share|improve this question
    
Do you have a virus? –  Derfder Jun 18 '13 at 10:11
    
It's a dedicated OVH server with Debian, I don't think it has any virus. –  rfc1484 Jun 18 '13 at 10:16
    
Download all files from FTP and check them wih some antivirus like nod32 to be sure there are no viruses. –  Derfder Jun 18 '13 at 10:43
add comment

2 Answers

up vote 4 down vote accepted

wp_cron is used to schedule tasks such as deleting old posts from trash, deleting old spam comments, and checking for plugin/theme updates.

share|improve this answer
1  
wp_cron is also used to automatically publish posts which are scheduled to be published at a set date and time in the future. It can also be used by various plugins that need to schedule tasks to occur at various intervals. –  Ben Cole Jun 18 '13 at 20:09
add comment

As was previously mentioned, wp cron plays a role in a number of key functions. Theoretically you can disable it without the site blowing up. However, it will hamstring you in a lot of ways. The disable feature exists for those that plan to call cron in another method.

Unfortunately, looking at that log file, it's very unlikely that your problem is a wp cron issue. You appear to have nefarious activity on the site. You may not be seeing outward symptoms of it but something is hammering cron that shouldn't be. This "could" be a plugin you're developing that is poorly coded and you don't realize is mis-firing or more likely this is something intentionally nefarious that is already in your site and attempting to trigger other actions.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.