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

learn more… | top users | synonyms

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
2answers
167 views

How to set up WP Cron in this scenario

I wanted to use Wordpress built in WP Cron to update currency rates daily. I use this function currently, require_once(WP_PLUGIN_DIR . '/autocurupdate/currencyexchange_class.php'); $cx=new ...
1
vote
2answers
890 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 ...
1
vote
1answer
2k views

WP CRON on shared hosting that does not allow loopback connections?

My hosting company infrom me that they do not allow loopback connections, which are required to run the following cron task on my server. I need to run a cron task for this plugin: ...
1
vote
1answer
59 views

When to use wp_schedule_single_event for async / non-blocking processes?

I have noticed this pattern in some plugins lately: <?php function MY_CRON(){ wp_schedule_single_event(time(), 'MY_ACTION'); } add_action('save_post', 'MY_CRON'); function MY_FUNCTION(){ // ...
1
vote
0answers
53 views

Get frequency of scheduled event

How do I get the frequency of a scheduled event? I am writing a plugin, that would do something in a user defined schedule. The way I am trying to do this, is creating a custom cron schedule, which ...
1
vote
2answers
88 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 ...
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') ){ ...
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
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'); ...
1
vote
1answer
235 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 ...
1
vote
0answers
144 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 ...
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 ...
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') && ...
1
vote
0answers
54 views

Cron job not run on activation [duplicate]

The code i am pasting is supposed to run the function exporting once on activation of plugin and then hourly. But it doesn't run on activation nor hourly. I do see it in the list of cron jobs that are ...
0
votes
4answers
1k views

add_action to wp cron?

I'd like to execute some code everytime my wordpress cron runs, regardless of the timeframe. Is it possible to create an add_action for this? I looked in the filter list but I couldn't find anything ...
0
votes
1answer
50 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
916 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 ...
0
votes
1answer
643 views

How to set intervals in cron jobs?

I am having a unmanaged VPS, where my wordpress site is hosted, I am also using WP-ROBOT 3 plugin for auto posting, I want it to do auto post through cron jobs, According to the documentation of the ...
0
votes
1answer
862 views

wp_schedule_event() set daily, but processed every second

Reading wp_schedule_event() documentation got me code something like this: add_action('cr_paid_link_manager_generate_expiring_link_email_action','cr_paid_link_manager_generate_expiring_link_email'); ...
0
votes
1answer
159 views

Do WordPress cron jobs slow down page loading?

If a user visits a site and his visit triggers a cron job that is quite intensive, the page load speed will be slower for him right? As I understand the page doesn't wait for the cron job to execute ...
0
votes
1answer
72 views

Manually trigger a wp_schedule_event item?

I have successfully added an event via wp_schedule_event and I'd like to trigger it manually without disrupting the existing schedule. Is there a way to tell WP to execute an event immediately ...
0
votes
1answer
202 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
1answer
189 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 ...
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
463 views

A unique wp_schedule_single_event() for each post?

I'm building a site for a client that requires sending out emails about each post at various dates (i.e. two weeks before after the post was published, then again four weeks after the post was ...
0
votes
2answers
26 views

setting up a wp cron job

I am a bit new to wp-cron job. I think i understand the concept but lack the implementation. i read a lot of tutorials on how to implement including this post: Run function at specific time but still ...
0
votes
1answer
32 views

Display a random tag but using cron to control frequency of change

Background - I have created a shortcode in functions.php which adds a single random tag with it's link and description to a widget in my sidebar. This is my existing code... function ...
0
votes
1answer
47 views

Custom interval is not working

I am trying to create custom interval for cron schedule with given user input, but its not working. Here is the code: add_filter( 'cron_schedules', 'custom_cron_schedule' ); function ...
0
votes
1answer
56 views

Issue with wp_schedule_event()

I am trying to set up an event on a custom interval that will grab new posts from an Instagram search and create them as wordpress posts. I had the code working on its own page, and now I am trying to ...
0
votes
2answers
29 views

Hook/Cron Problem

I have this fuction in my fuctions.php <?php if ( !wp_next_scheduled('re-post2') ) { wp_schedule_event( time(), 'hourly', 'rep-post2' ); } function repostads() { global $wpdb; $querystr ...
0
votes
1answer
37 views

How can I prove if wp cron is running my task if I have DISABLE_WP_CRON set to true

I am trying to trigger a wp cron task via a real (linux) server cron and have followed online instructions to add this to wp-config: define('DISABLE_WP_CRON', true); My cron job does this : wget ...
0
votes
1answer
295 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 ...
0
votes
2answers
352 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 ...
0
votes
1answer
168 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!
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
1answer
121 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 ...
0
votes
1answer
248 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 ...
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) ...
0
votes
1answer
55 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 ...
0
votes
1answer
92 views

How to move post process to background

We have a large wp install that is freezing up whenever an editor hits "publish". It seems that the culprit is the pinging processes that run, such as re-building the sitemap, etc. Is it possible to ...
0
votes
1answer
75 views

How to parse a huge list of users using a CRON function?

I have several thousand users subrscribed to a WP website. Everyday I need to send an email to each user. The emails are custom generated depending on the data of several custom user profile fields. ...
0
votes
1answer
126 views

What is the most efficient way to execute recursive complex queries?

There's a "Jobs" section on my website (custom post type), with various associated taxonomies (language spoken, type of contract, location, etc.) The website also has a very big user base (about 10 ...
0
votes
3answers
797 views

What causes wp_schedule_single_event to fire off?

This isn't as simple of a question as you may think. Basically I have a C# program that is hitting the worpdress site and the wp_schedule doesn't seem to fire off. If I go to the site with my firefox ...
0
votes
0answers
14 views

Cron job not firing

I'm having this problem where cron jobs doens't seem to post delayed posts.. I'm using this cron job wget -O /dev/null http://domain.com/wp-cron.php?doing_wp_cron Am i doing something wrong?
0
votes
0answers
13 views

Cron job to delete post by title

I've searched a lot and I didn't find nothing that could help me. So, I want a cron job to automatically delete posts that have no title. Why I want that? I have a IFTTT recipe that automatically post ...
0
votes
0answers
18 views

Scheduled event occurring each page load, but supposed to happen daily

I have a scheduled event that is supposed to occur only once a day at 12am. However, for some reason my scheduled event is happening on each page load and I can't figure out why. The default ...
0
votes
2answers
21 views

Pages for Cron use Only?

so I've got a bunch of custom page templates that are scripts that are meant to be run by cron to update various things on my wordpress site, there are not meant to be viewed by regular site users. ...
0
votes
0answers
30 views

Expire a post with meta_value after two weeks

I am trying to use the below code to query for some posts and then change a meta_value in order to "expire" it after two weeks time. I can't get this to work and it's difficult to test since I can ...