wp-cron refers to a WordPress subsystem that allows for the scheduled execution of code

learn more… | top users | synonyms

4
votes
1answer
225 views

wp_delete_auto_drafts() deletes links in menus

Since yesterday the wp_scheduled_auto_draft_delete cron job somehow deletes all page entries from our menus. All entries in the table wp_postmeta with meta_key = '_menu_item_object' and meta_value = ...
2
votes
3answers
378 views

How can I change the frequency of a scheduled event?

I have declared a scheduled event in a plugin like this : function shedule_email_alerts() { if ( !wp_next_scheduled( 'send_email_alerts_hook' ) ) { wp_schedule_event(time(), 'hourly', ...
1
vote
3answers
676 views

Run a cron job (or similar) in the background of WP after post update/create

I would like to run a filter on post content after it has been created or updated. I would like this to occur after the user has submitted the post, as it may be a bit of a lengthy process (a ...
3
votes
1answer
143 views

Using wp_cron with custom time interval and the register activation hook

Scenario 1: fails Adding a cron task wp_schedule_event with a custom interval on plugin activation using register_activation_hook outside the class definition fails to work because the custom ...
0
votes
1answer
130 views

WP Cron: Save third party data as user meta

Editors note: Twitter ID and Google Analytics only serve as examples and are exchangeable. TL;DR I want to save external data in a user profile once or twice a day. I added two custom fields in my ...
0
votes
1answer
112 views

WordPress Cron Schedule the if and else statement

I have a custom php loop/function written that works in the following way $start = strtotime(date("Y-m-d H:i:s", strtotime("+5 hours"))); $end = get_post_meta( $post->ID, '_limited_dates_to', true ...
4
votes
4answers
12k views

Why is ?doing_wp_cron being appended to my URLs

I'm finding this string appended to the end of my URLs sometimes: /?doing_wp_cron Does anyone know what it for? How can I remove it?
8
votes
4answers
1k views

WP Cron doesn't execute when time elapses

The goal I want to use wp_schedule_single_event( ) to execute a single event that sends me an e-mail 8 minutes after the user submits a form. The issue The following code is in my functions.php: ...
1
vote
1answer
1k views

Wordpress schedule posting not working

I have Wordpress 3.5.1 and I use Bluehost hosting service. When I schedule posts after that time passed, WP posts dashboard shows "Missed schedule" message under the date. Then I checked my ...
1
vote
1answer
446 views

Schedule event every second thursday of the month

I'm working on an email system and they want it automated to send out emails every second thursday of the month. I've got the PHP sorted out and ready to fire a callback to send the emails, but I'm a ...
1
vote
2answers
2k views

wp_schedule_event will it run if timestamp has passed?

I've been told by my clients that scheduled jobs are not run some times as expected. I never questioned myself about how wp_cron actually works, I thought it was kinda self-explanatory. But now I ...
2
votes
2answers
506 views

Missed scheduled WordPress

I am currently in version 3.1 of WordPress and I have a problem with planning my post. In fact, whenever I plan a post, it is written: "Scheduled missed. Could you help me please. Thank you in ...
1
vote
2answers
271 views

Posts wont expire

I am having some trouble with scheduling posts to automatically expire (either by deleting or going to draft), every plugin I have tried does nothing and when it reaches the scheduled time nothing ...
1
vote
2answers
161 views

How is WP Cron Locking implemented?

WordPress takes measures to ensure that a cron task doesn't run twice when it should run once, e.g. once every hour when an hourly schedule is given, rather than the occasional twice at the scheduled ...
1
vote
2answers
741 views

Cron Job not working in plugin

I have written a plugin that will convert posts to excel format and then email the .xls to an email id. I can make it work with when function is declared in functions.php but does not work with ...
1
vote
2answers
944 views

Initialize WordPress environment to use in a real cron script

I have to run a PHP script through real cron (WP cron being too unreliable). Within that script, I need $wpdb to insert data into WordPress table. But of course $wpdb will not be available as ...
0
votes
1answer
54 views

what is firing cron

I've been having problems while trying to setup a simple cronjob. A lot of the WordPress tutorials like this one http://tommcfarlin.com/wordpress-cron-jobs/ specify a crontab with some time schedule ...
0
votes
1answer
61 views

Using a Cron Job to dynamically populate a field ONCE, and then making the field blank the next time someone visits page

I'm probably going to butcher explaining what I'm trying to do, so bare with me. Essentially I'm working on a custom Contest type of solution for a client. I'm using Gravity Forms for the users to ...
0
votes
1answer
121 views

WP_Cron doesn't do the job: Multisite stats

I already found out how to get the amount of networkwide posts in WPMS. Until now the function was called by a user who opens the website. So it was rebuild every 24 hours. I don't want to let a ...
0
votes
1answer
60 views

Running a function on post content and CPT meta

As per this thread I'm scheduling a wp_cron every hour which runs a function. The function I'm running is reasonably lengthy and I didn't want authors to have to deal with the waiting times. My ...