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

learn more… | top users | synonyms

2
votes
1answer
2k views

Scheduled 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
5answers
239 views

How to run a function every 5 minutes?

I have a function to be run every 5 minutes. I've referred following from the codex: <?php wp_schedule_event(time(), 'hourly', 'my_schedule_hook', $args); ?> I want to run this function just ...
3
votes
1answer
72 views

Wordpress cron isn't scheduled on amazon web services

I'm trying to setup a cron to run every hour, it works fine on my local vagrant box, but it doesn't seem to schedule properly on aws(elastic beanstalk). Here's the code: ...
0
votes
1answer
442 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 ...
3
votes
1answer
488 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
860 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
43 views

How Can I lock function to prevent running multiple instances in one time?

I have written a plugin. There's a function int it that works with a DB table and (works on a data tree) ,I want if function starts running ,other instances lock until it finishes(then other instance ...
0
votes
1answer
544 views

Set post to draft after set period based on post_modified date

I have a custom post type for the user profile page. My client wants all users to update their profile at least once a month, so we want their profile (custom post) to be automatically set to draft ...
0
votes
1answer
12 views

wp-cron function not running when activating the cron by form submit

I'm activating the cron by a form submit button ( not when plugin is activated ). Thus users have choice to set the cron or not. But it doesn't trigger the function. The cron is set, but triggering ...
9
votes
5answers
9k 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 ...
0
votes
2answers
31 views

Wordpress cron is running with previously set time intervals and not the updated one

For testing purposes I keep short time intervals for cron and when the functionality is working fine, I change it to the required time interval. Whenever I change the time intervals for ex: from ...
3
votes
2answers
888 views

How to run WP Cron the right way?

I have WordPress Multisite with several sites. I set up DISABLE_WP_CRON to true in my wp-config.php. How to run wp-cron.php the right way? If we set up cron task with wget or curl we have 30 sec ...
1
vote
0answers
24 views

Cron job not working - Can't see in the queue attached

I have a custom schedule defined for a cron job to be triggered. This is how my code looks: <?php //wp-config define('DISABLE_WP_CRON', true); //Plugin file register_activation_hook( '__FILE__', ...
1
vote
1answer
18 views

How to disable wordpress cron jobs for a subsite?

Is there a way to disable the execution of all the cron jobs of a particular subsite in a wordpress multisite installation?
0
votes
2answers
69 views

Run function with linux cron job in Wordpress

I know that WordPress has a faux cron that is called like so when a user visits the page. register_activation_hook(__FILE__, 'my_activation'); add_action('my_hourly_event', 'do_this_hourly'); ...
0
votes
0answers
13 views

How to Solve the Wordpress Cron Job Site Slow down Problem?

The Cron job has more data's which creates entry everytime when a page is loaded. So i tried to get a solution by searching about it. I got some clarifications. But no solution for my problem. Many ...
0
votes
1answer
32 views

Too many wp-cron requests even when disabled

We have a webserver with a number of wordpress instances. Most if not all of them have disabled wp-cron.php using the wp-config line define('DISABLE_WP_CRON',true); Despite this, there are more ...
0
votes
1answer
27 views

WP Cron not executing after timespan

I trying to utilize wp_schedule_single_event to schedule an asynchronous task. However, my event was never called after 60 seconds. Do I need to do anything with ldp_new_topic_event hook before using ...
0
votes
1answer
39 views

Sending emails to separate accounts using a for loop

I need to run a for loop to go through all the users on my site and send any that are applicable an email. A user can have several categories on their profile, let's say 4. If the customer has ...
0
votes
0answers
23 views

How to add Cron to WordPress

I trying to develop a plugin to send emails to users in a specific time, so I have created my plugin like that : register_activation_hook(__FILE__, 'my_activation'); add_action('my_hourly_event', ...
0
votes
1answer
55 views

WP Cron as Fast as WordPress AJAX?

I have a question about performing a very long and resource intensive task within WordPress. Here is the scenario. I have a plugin that allows users to run a task that takes a very long time and ...
3
votes
2answers
174 views

Wordpress scheduled task is called but not executed

I created a plugin with a cron to update all posts of a certain type every 5 minutes. I installed WP Crontrol to check if the cron is registered correctly and everything seems to be okay. This is how ...
6
votes
3answers
558 views

wp_schedule_event won't accept args

I'm trying to schedule event on hourly basis but it doesn't work. Why, I can't understand. Here is a function that i use to schedule event. add_action( 'scheduled_update_feeds', 'update_feeds', 10, ...
0
votes
0answers
26 views

How to setup a mail list with 2 hour autoresponder?

I have a WordPress blog and I want to put my product behind a subscribe list sign up. Here are my requirements: Need subscribe list to work with WordPress or Dreamhost (my hosting company is ...
1
vote
4answers
74 views

Cleaning “cron” from options table, will affect anything?

I have some scheduled events in my WordPress site. For that I use a cron job, so it has created an option in the wp_options table. After some days, my site is getting slow. When I check my database, ...
3
votes
1answer
87 views

Multiple wp_schedule_event cron jobs in plugin cause multi-execution

over the last week I have been working on some cron jobs for a real-estate website that has hundreds of updates/deletes and new posts added each day. I am very near the end now and looking to ...
0
votes
1answer
45 views

daily job to run send email based on user data

Quick setup/info: A user can login to my site and is presented with a form to complete. The form contains a Category drop down, and then 5 possible text fields with a Task Name and a Completion Date ...
0
votes
0answers
13 views

How to email a published post notification at a certain time?

I am using follwoing code to send an email if any post is published or draft to published. <?php add_action('future_to_publish', 'send_emails_on_new_event'); add_action('new_to_publish', ...
0
votes
0answers
32 views

WP_cron not updating post meta, instead clearing it

I'm trying to store social media follower count (ex. FB fans, Twitter followers) in post meta daily with wp_cron. If I manually save the post it will save the social media count numbers correctly in ...
0
votes
0answers
2k views

WP-Cron tasks scheduled but not running

I'm working on a particularly large WordPress multisite network, and have been struggling with WP-Cron. It seems that WP-Cron tasks are being scheduled, but not run. The WP-Cron tasks are not being ...
0
votes
1answer
35 views

couldn't connect to host - wp-cron.php?doing_wp_cron

I've moved my wordpress website to new dedicated server. Website is running few cron jobs setup by wp-cron. As soon as i moved the website to new server cron jobs stopped running. I've debug bar ...
1
vote
0answers
23 views

Can you register two cron events in a single function?

Take the following: public static function activate() { wp_schedule_event( time(), 'twicedaily', 'process_rss_items' ); wp_schedule_event( time(), 'minute_15', 'process_top_news' ); } // end ...
0
votes
1answer
37 views

How to customize 'recurrance' of' wp_schedule_event'?

I am new to WordPress development. I build a function to send email twice a day with wp_schedule_event. My recurrance is twicedaily. Is this possible to change twicedaily time to 9:00 and 14:00. If so ...
0
votes
0answers
17 views

Error log says wp_create_category doesn't exist when run in a cron

I have a plugin written for a client that takes an XML feed they have and creates WP posts from it. It works both by being able to manually pull the feed through an interface (which also lets them set ...
0
votes
1answer
57 views

Is it normal for a scheduled post to say “Missed Schedule”

There is a custom post type I am making called announcements. When I set it to a future publishing time, say at 8:00. It will say at 8:01 'Missed Schedule'. However after a little while I will refresh ...
0
votes
1answer
16 views

How to prevent the scheduling of the same event on the same day

I have an system right now where the user can setup to send out emails on a schedule. However, my clients want the ability to only allow 1 scheduled email to go out once a day. If they attempt to ...
0
votes
0answers
35 views

Cron schedule interval through plugin options?

My plugin sets up a CRON job on plugin activation to run after every 5 minutes. I want to provide a section in my plugin settings page, where the user can specify an interval. How would I do it? I am ...
1
vote
1answer
59 views

Hourly scheduled wp_cron job keeps getting rescheduled

Every time I refresh the page, my cron job update_backup_now_feed seems to have its timer reset. I'm using a plugin called "crontrol" that displays the time until next call, and every time I refresh ...
0
votes
1answer
60 views

wp_schedule_single_event does not call my action

I have created the following action: add_action( 'test_action', 'test_action' ); function test_action() { error_log( 'test_action' ); } And am calling it like this: error_log( ...
0
votes
1answer
41 views

Wrote a WP Cron Plugin and it triggers a fatal error upon activation

I'm writing a WP Plugin for one of my sites that hooks into a public API to get app data and save that within Wordpress to allow for WP to be able to search & filter the data based on new ...
1
vote
1answer
59 views

Loading custom content type from ajax results?

Using WordPress 4.3 and we have a custom post type with custom fields. It's easy to just import all of this content from a DB to the WP DB and everything will be there. Problem is, all internal work ...
0
votes
1answer
86 views

Huge cron option_value into wp_options table

I recently noticed after performance errors and failure that the memory that a single request was consuming (either front or back) was increased rapidly. After hours of experiments and research I ...
0
votes
1answer
33 views

Cancel/Stop a currently ongoing scheduled cron event?

If I scheduled a CPU-intensive job via a cron scheduled event, how do I go about stopping it or cancelling the job while it is currently running?
1
vote
1answer
44 views

Triggering wp-cron by cronjab directly rather than with wget?

Can you just trigger wp-cron.php using "php /path/to/publichtml/wp-cron.php" rather than going through the wget method (e.g. "wget -q -O - http://example.com/wp-cron.php>/dev/null 2>&1")?
0
votes
0answers
15 views

Countdown Timer to Publish Draft

I am attempting to create a way for specific draft posts to be published after a 36-hour countdown. Basically, the site allows post submissions which are voted on, and the winning post gets ...
0
votes
0answers
52 views

WP Cron does not work on MAMP server

Using PHP 5.5.10 and WordPress 4.3. No matter what, I can not get Wp-cron to work. If I visit wp-cron.php or wp-cron.php?doing_wp_cron it works after a few seconds of waiting. I.e. it echos "Hello". ...
2
votes
2answers
365 views

WP Cron and wp_insert_post

I'm trying to insert posts using a cron job, but I keep running into errors where WP is missing functions (is_user_logged_in, wp_get_current_user). Is there a proper way to run wp_insert_post using a ...
0
votes
0answers
45 views

WordPress Cron scheduled but not running?

I know that WP Cron is not a real cron and I am testing it by visiting it at when it is scheduled to run. I can see that it is scheduled using the crontrol plugin but clicking execute now does nothing ...
0
votes
1answer
363 views

wp-cron.php - timeout

I found via Query Monitor plugin, that there is some HTTP request error during page load. I looked at the error table, and here I found that problem is with this: FULL_IMAGE How can I delete this ...
0
votes
2answers
76 views

How to Insert data with wp cron

I am using wp_schedule_event for Insert data every 1 Minutes in a teble. But here is some confusion where i have to add code for Insert. Here is my code which add in functions.php in my theme. ...