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

learn more… | top users | synonyms

0
votes
0answers
46 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
296 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
103 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
41 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
201 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
113 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
351 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
786 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
161 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
186 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
127 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
167 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
454 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
129 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
109 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
101 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
2answers
205 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
156 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
291 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
913 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
80 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
181 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: ...
2
votes
1answer
609 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
68 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
40 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
189 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
118 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 ...
4
votes
3answers
2k 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
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: ...
2
votes
1answer
247 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
429 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
245 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
253 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
177 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
356 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
253 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
234 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
159 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
142 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
247 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
143 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
113 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
182 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
200 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 ...
2
votes
1answer
247 views

get_posts inside cron

Edited to rewrite my question I'll try to be as clear as possible, as I need to get this resolved quickly. I disabled WordPress' cron, and added a real cron job on my server to call wp-cron.php ...
1
vote
0answers
21 views

How ( and mostly at what time ) can i prevent the alternate cron from running?

I'm using the alternate cron version, but i need to prevent it from running on some calls, how can i do this? In the cron.php file i've seen on line 225 if ( defined('ALTERNATE_WP_CRON') && ...
3
votes
2answers
418 views

Run WP Cron Weekly (but on a certain day)

I'm looking add-in a bit more speficity to the WP Cron intervals. To add a "weekly" interval, I've done the following: function re_not_add_weekly( $schedules ) { $schedules['weekly'] = array( ...
2
votes
1answer
331 views

Do wp-cron scheduled tasks run asynchronously?

I have a task scheduled to run daily using wp-cron. The task takes over a minute to run (between downloading and parsing a very large file with cURL). According to the WP documentation, "The ...
1
vote
1answer
409 views

How to make sure a wp-cron job runs

I am using a plugin to send emails to a relatively large email list. Because we have a low per-hour email threshold from our host we have to use a setting in the plugin to throttle the emails down to ...