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

learn more… | top users | synonyms

0
votes
1answer
77 views

Regenerating array key for wp_schedule_event args

I've been working on this the last day with no luck. Is there any way to update a stored args array key for an event scheduled? Reason I ask is I have array args that look like this when scheduling a ...
1
vote
2answers
91 views

Do multiple jobs on date change without WordPress cron job

I m trying to randomize several posts on my client's site which are on different pages , everyday. So I wrote a function which returns true on date change, and if does, I randomize the post ids and ...
0
votes
1answer
448 views

WP Cron job every 1st and 15th of the month

Trying to set up custom schedules for WP Cron, knowing that they use an interval is it even possible to set up a cron job for every first of the month? As well as every fifteenth. This is what I have ...
1
vote
1answer
408 views

Scheduling posts to update once per day with wp_cron

I have a function that hooks into save_post that changes the value of a custom taxonomy term based on today's date. That's working fine. When I update a post, the taxonomy term is updated correctly. ...
0
votes
0answers
32 views

WPMU schedule doesn't execute actions

Here's a simple event that is correctly scheduled to be executed daily. Unfortuantely, it doesn't execute delete_old_users() function daily. It is supposed to delete users older than a certain date. ...
0
votes
0answers
47 views

Plugin Hooks Not Shown in WP Cron Jobs

I have installed a WordPress backup plug-in. This plug-in has several hooks. Some of those hooks should activate right after I trigger the backup tasks. But the problem is, after I start that plugin ...
0
votes
1answer
394 views

wp_schedule_event in a class

This is my (stripped down) plugin, in OOP: <?php /* Plugin Name: Cron Test Plugin URI: http://www.mywebsite.com/ Description: Test Version: 1.0 Requires at least: 3.0 */ class CronTest { public ...
0
votes
0answers
114 views

Wordpress can't seem to handle tens of thousands of scheduled posts? Cron Breaks

I have a website listing doctors in the us. I'm spreading out the posts over 2 years, but I have about 2.8 million doctors to list. Right now I'm adding the post automatically via a custom script, and ...
0
votes
0answers
46 views

Reading csv from specific directory and insert it to custom post type (cron job)

Need a comprehensive cron job script to read .csv data uploaded regularly to specific folder. Will insert data to custom post type only if csv exist base on cron job current date. Any suggestion of ...
0
votes
1answer
230 views

wp_schedule_event - function won't execute

I use wp_schedule_event to have the function updatePostCounts() executed every hour. I also use the plugin "WP Crontrol" which shows me that the hook (opbs_update_counts) is there and is run every ...
0
votes
1answer
129 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
2answers
428 views

How make a php script run only with wp-cron

I have a php script that executes a function and creates an xml file with results. I want this script runs only once daily and i'm using wordpress cron to do this. Problem is this script always runs ...
1
vote
1answer
978 views

Failed to open stream: HTTP request failed! in \wamp\www\wordpress\wp-includes\class-http.php on line 929

I'm writing a theme and almost everytime I reload a page, Wordpress is giving the following error Warning: ...
0
votes
1answer
181 views

Can wp_schedule_single_event be used to run background proccess?

I got a plugin that let users send invitations to their friends. If the user have like 4000 friends we run into trouble. At the moment i use a simple batch like the following for emails. But we also ...
0
votes
1answer
259 views

Need to execute a cron job

I need a cron job to execute the following url http://www.mywebsite.com/wp-admin/admin.php?page=myvideoblog/mvb_main.php&action=processfeed&updatefeed=67 The problem is that it requires ...
1
vote
1answer
190 views

Cron jobs in a class

Having: pluginname.php // If this file is called directly, abort. if ( ! defined( 'ABSPATH' ) ) { die(); } define('PLUGINNAME_PLUGIN_URL', plugin_dir_url( __FILE__ )); ...
0
votes
1answer
253 views

How to use wp cron job to run a function

I have one function: "update_user_like" to sum ​​all facebook likes from all user's posts. How to run that function at 3am every day by wp cron job? Thanks much!
2
votes
2answers
688 views

What happens when wp_cron is deactivated in Wordpress?

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" ...
3
votes
1answer
160 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
115 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 ...
0
votes
1answer
116 views

Interrupted cron script sending me hourly emails. Please help!

One of my Wordpress installs (cPanel VPS) had a cron job (backup to Dropbox script) that was interrupted. Ever since the interruption I receive hourly emails from root@ cPanel/WHM: -Excessive resource ...
0
votes
3answers
281 views

WP Cron doesn't save <iframe> or <object> in post body

I am using wp_cron to auto grab posts from a remote website and save them in my wp db. NOTICE! I am executing my code from my plugin, not from my template functions.php or somewhere else. I have my ...
3
votes
1answer
203 views

Which action for triggering cron “wp”or “init”?

Which one do you recommend using within a plugin and why? add_action( 'wp', 'trigger_me' ); function trigger_me() { if ( !wp_next_scheduled( 'my_plugin_cron' ) ) { ...
3
votes
1answer
378 views

run a cron task without obstructing page load?

I have a plugin that lets users upload post attachments via AJAX in the admin area. I later try to push these files to DropBox via their REST API. It almost works. The issue is with WP cron task ...
0
votes
1answer
1k views

Better handling of WP-CRON server load abuse

There are multiple reports on how wp-cron is a far from ideal solution because it runs every time a page is loaded, which is unnecessary in most scenarios (one scenario in which it would be necessary ...
2
votes
1answer
92 views

Scheduling a task using class methods

I need to implement a scheduled task in my plugin, and I tried to follow the examples in the documentation, passing one of class methods as the target. I installed Cron Manager plugin, and I see that ...
2
votes
1answer
191 views

WP Cron emails not working

Running wp 3.5.1. I have 2 plugins that work in part. They do everything nice. If I click to send emails, they send the emails. However the scheduled emails are not being sent. The plugins are: ...
3
votes
1answer
1k views

Is there a quick way to view the wp-cron schedule

I'm trying to work which plugin is triggering wp-cron. I know about the code: http://codex.wordpress.org/Function_Reference/wp_get_schedules , but I'd prefer to do something in the sql backend rather ...
1
vote
0answers
74 views

Wordpress daily cron is executing more frequently than once a day

I have a wp cron job scheduled based on what's in the options. In this case its schedule daily. add_action('init', function(){ if( !wp_next_scheduled('product_posting_cron') ){ ...
0
votes
1answer
42 views

Are uploads directories created on a schedule?

I have a cron job that alerts me to modified files on a couple of WordPress installs. Two of them alerted me tonight to the creation of apparently empty folders like ...
0
votes
1answer
229 views

wp-cron: freeze at “now”

sorry for the silly question. Briefly I have a wp (v. 3.5.1) blog using a heavily modified (by myself) theme. Everything works fine except for wp-cron. Listed jobs appears in (for instance) crontrol ...
0
votes
1answer
134 views

How to make wp cron job not fire immediately?

I'm scheduling a job in wp cron: add_action('my_cron_hook', 'my_cron_action'); wp_schedule_event( time(), 'interval1', 'my_cron_hook' ); function my_cron_action(){ //do something } The ...
6
votes
3answers
4k views

Converting timestamps to local time with date_l18n()

I've got a WordPress cron job that sends an email periodically and saves the timestamp when it was sent as an option, and I'd like to display a date on a settings page. Something like, "The last ...
8
votes
4answers
2k 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: ...
3
votes
1answer
289 views

Change post status based on meta value

I have this cron set up to trash posts x days after it is posted. This works. Edit: Added my answer to my question. add_action( 'wp', 'do_trash_ads' ); function do_trash_ads() { if ( ! ...
1
vote
1answer
561 views

How do i schedule cron in wordpress for each second?

I want to schedule a cron job in Wp3.5.1 to sending email to those customer whose appointment is pending. here some code am trying: For the testing am scheduling corn for each second to insert row ...
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 ...
0
votes
1answer
304 views

Managing scheduled tasks

I want users of my plugin to be able to define whether a task operates daily, twice daily, hourly or not at all as per the standard WP set-up. I'm storing these as 'daily', 'twicedaily', 'hourly' or ...
1
vote
1answer
329 views

wp_next_scheduled returning a past timestamp

So, here is my entire code in wp_content/plugins/my_plugin/my_plugin.php : register_activation_hook(__FILE__, 'comunity_mails_activation'); add_action('check_mails_to_send', 'do_this_daily'); ...
2
votes
1answer
190 views

Scheduled Posts and wp-cron - Why don't scheduled posts publish if too old?

I notice that the documentation for wp_schedule_single_event mentions the following:- The action will fire off when someone visits your WordPress site, if the schedule time has passed. However ...
4
votes
1answer
376 views

When does next Cron Job run (time from now)?

I would need to know how much time is left between now and the next time a specifc Cron Job is done. For another answer I built a basic cron inspector plugin which can be found here. Reason I'm ...
3
votes
1answer
297 views

Trigger a cron every 24h GMT -8

I' like to run a cron every 24 hours at midnight PST ( = GMT -8 ) This is what I have if ( !wp_next_scheduled( 'cron_hook' ) ) { //reset on 00:00 PST ( GMT -8 ) == GMT +16 $timeoffset = ...
1
vote
1answer
265 views

How to fix missing function in wp-cron?

One of my sites consistently fails to publish scheduled posts. I've tried disabling plugins, using Twenty Twelve, etc. with no luck. I installed the Core Control plugin and noticed that there is no ...
0
votes
1answer
193 views

Create wp_cront events dynamically upon user submission

Is it possible to set up new wp_cron jobs dynamically upon a certain action? I have a form submission (I'm using Gravity Forms, so have several functions set up on several of their hooks already) ...
1
vote
2answers
184 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
1answer
298 views

Getting Error “invalid secret string” by running wp-cron.php manually

I am trying to run the wp-cron.php manually by calling it that way: http://mysite.com/wp-cron.php?doing_wp_cron Disabling the auto cron function with : define('DISABLE_WP_CRON', TRUE); produces ...
1
vote
0answers
197 views

wp_schedule_single_event function not working

I am testing the wp_schedule_single_event function and it is currently not working on my upgraded version of wordpress. It looks like the event is being scheduled but the code in my hook is never ...
2
votes
1answer
130 views

Long running action from plugin

I'm creating a WordPress plugin that will copy posts data to a remote database, I know it will take a while to transfer all the posts. How should I create copy functionality so it won't timeout? ...
1
vote
1answer
200 views

How to code schedule / cron job

I am using wp_schedule_event to hourly insert items from an rss news feed into my client's blog. Here is how I am setting it up in my functions.php: add_action('init', function(){ $timescheduled ...
1
vote
0answers
209 views

Is it possible to use `wp_schedule_event` with real cronjobs?

I hate the way Wordpress Cron Jobs run, so I disabled them: define('DISABLE_WP_CRON', true); and want to run a real cron job instead: wget http://www.myserver.com/wp-cron.php > /dev/null ...