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

learn more… | top users | synonyms

2
votes
1answer
293 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
582 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
402 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
455 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 ...
5
votes
2answers
1k views

How to use wp_schedule_event in a class?

This is first time that I tried the OOP method of writing an application. I don't quite understand it yet. Currently I have this cron hook: if( !wp_next_scheduled( 'my_cron_hook' ) ) { ...
1
vote
2answers
171 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
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 ...
1
vote
2answers
818 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 ...
2
votes
1answer
184 views

How to remove unused avatar uploads in buddypress [closed]

Im seeing in my wp-content/uploads/avatars folder that there are tons of avatars from when I created test users, but changed the avatars. So, i’m assuming that even if the user changes their avatar, ...
10
votes
1answer
2k views

PHP Warning on fresh install (Connection timed out)

I get this PHP Warning when accessing my fresh WordPress 3.4.1 install (Norwegian language). Warning: fopen(URL_TO_MY_WORDPRESS_PAGE/wp-cron.php?doing_wp_cron=1341476616.7605190277099609375000): ...
3
votes
1answer
339 views

Recurring scheduled task help

I'm trying to set up a scheduled task in my Wordpress installation which will (eventually) run a script to send an email once a day with a load of data in. However I can't seem to get a scheduled ...
2
votes
1answer
415 views

How Do I Make WordPress Run an Event Every Day?

In a plugin I want to build, it deals with contests. A contest has a date on it. Does WordPress have a feature in it where it can run a piece of code every day without requiring someone to create a ...
0
votes
4answers
2k 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
213 views

How do you make a custom post type items automatically delete items 3 months after publication?

I'd like somer code that I can place in my functions.php file that will only modify the specified custom post type. I have already tried several plugins, but all of them have more features than I ...
3
votes
1answer
216 views

Hourly WP schedule, do I need at least 1 visitor hourly?

I am planning to schedule an hourly task from my wp plugin, as I understand these tasks are triggered by visits to the website. So for an hourly task I will need at least one visitor hourly. Does it ...
3
votes
1answer
222 views

Can't find wp-cron.php but I can see it in the public folder [closed]

I have a problem with the wp-cron.php file. I can see it when I browse the public folder and it has the permissions set to 755. But still I am getting this error in my server error log: [Thu Mar 15 ...
1
vote
2answers
370 views

WordPress Caching - Transients API or “update_user_meta ” Cronjob?

I'm trying to set user meta based on queries. Basically, things like IF the query returns true, set this or if not, set this (or don't set it, if it is true). This works great but the problem is I ...
0
votes
1answer
65 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 ...
1
vote
3answers
706 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 ...
1
vote
1answer
492 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 ...
6
votes
2answers
834 views

Running WordPress on the Command Line - Turn off Delayed Output?

I'm creating a cron job that runs outside of WordPress. From a development perspective, this makes it really easy to debug and create cleanup scripts or cron jobs, by just running a command like the ...
0
votes
1answer
495 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 ...
2
votes
1answer
580 views

Some rogue WordPress plugin killing my server - how do I isolate and kill it?

Every so often my VPS server becomes unresponsive for no obvious reason. CPU usage is flat. No spike in traffic etc. When I run a top command on the machine (Centos) I can see that one of my sites has ...
0
votes
1answer
93 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 ...
1
vote
2answers
1k 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: ...
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. ...
2
votes
3answers
408 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', ...
0
votes
1answer
131 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
900 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 ...
2
votes
2answers
543 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 ...
3
votes
2answers
2k views

Using wp_schedule_single_event with arguments to send email

I'm trying to schedule a pseudo cron job to send an email after a set amount of time utilizing a WordPress plugin. So far, I've been able to make this code run when I hard code the email address and ...
11
votes
1answer
6k views

How to test wp_cron?

This is kind of a stupid question... I scheduled a action to run every hour: if(!wp_next_scheduled('my_hourly_events')) wp_schedule_event(time(), 'hourly', 'my_hourly_events'); ...
4
votes
4answers
13k 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?
0
votes
1answer
690 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 ...
1
vote
2answers
279 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
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 ...
0
votes
1answer
966 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'); ...