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 wp-config....
0
votes
1answer
626 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
652 views

How to avoid timeout waiting for output from CGI script?

I have Apache Error coming from /wp-cron.php. I didn't modify that file. How can I avoid the timeout?
0
votes
1answer
486 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 wp-...
0
votes
1answer
541 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 ...
4
votes
0answers
42 views

wp-cron.php is triggered, but scheduled post is not published

I am new to wordpress. My site had been posting scheduled posts, but it seems to stopped due to no traffic. So I disabled wp default cron, and setup a cron job via cPanel. via command wget -q -O - ...
2
votes
1answer
1k 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. ...
3
votes
1answer
557 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 ( ! ...
2
votes
0answers
14 views

crontab wp-cron.php on multisite path-based network: one for each path? Or just one for the root?

I have a single wordpress with multisite config enabled: define( 'WP_ALLOW_MULTISITE', true ); I want disable internal cron in wp-config.php with: define('DISABLE_WP_CRON', true); My multisite ...
0
votes
0answers
25 views

Change update interval of wp_cron event without having to reactivate plugin

I recently wrote a plugin: Host Analytics.js Locally. It allows the user to self-host Analytics.js and updates it automatically by scheduling an update-script in wp-cron and runs that daily by default....
1
vote
1answer
9 views

trouble calling an import class from an action in a plugin before wp_cron executes

I’m using the wp_crontrol plugin to call an action added in my functions.php file which then calls a function in my plugin file. WP gets to my function but can’t call the class, I get this error: PHP ...
3
votes
1answer
1k 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
1answer
13 views

How do I routinely extract the thumbnail of the most recent post?

I would like to write a PHP snippet that can communicate with Wordpress. When a new post is published, a file today.jpg will be generated from the thumbnail url (a custom field) of the most recent ...
0
votes
1answer
27 views

Scheduling posts in database

I have more than 100 posts to schedule. I have set the date and the status (future) with a SQL query. But when the time comes the post is not published and in desktop I can read message 'Schedule lost'...
0
votes
0answers
24 views

How to create a WP Cron hooks based on schedules from Advanced cron manager plugin?

I need to run the following script once per 24 hours: (1) http:domain.com/wp-cron.php?import_key=Iq_GCn7v0&import_id=36&action=trigger the following one to run after the above, once or twice ...
5
votes
1answer
209 views

wp_schedule_event() on specific time, daily

I'm not well verse with WP Cron, but I used them in one of my site knowledgeably. I set a custom query for every hour: add_action( 'init', function () { if( ! wp_next_scheduled( 'expire_cpt' ) ) {...
1
vote
3answers
378 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 ...
0
votes
1answer
29 views

WP Cron being triggered but not working as expected

I have created a WP cron job, my code for the cron job is shown below: public function run_import(){ if ( isset($_POST["run_import"])) { add_action( 'import_execution_event_test', ...
3
votes
2answers
91 views

WP Schedule Event - Every Day When First Visitor Comes

I have a daily wp schedule event. I know that it happens when a user visits the site and if a schedule time passes. If I started it on today 12 a.m. and if tomorrow first visitor comes tomorrow 1:...
0
votes
0answers
28 views

Set up a wp_cron to work daily, and set up a real cpanel chron, but its not working

So I followed all the instructions on this page https://support.hostgator.com/articles/specialized-help/technical/wordpress/how-to-replace-wordpress-cron-with-a-real-cron-job disabled wp_cron, and ...
1
vote
1answer
59 views

Why Should We Use wp_clear_scheduled_hook and What it Does?

I am new to cron job. After reading this article I was able to run a function every hour using wp_schedule_event. There is a quote on "Don't forget to clean the scheduler on deactivation" in that ...
0
votes
1answer
26 views

Schedule Removal of Menu Page and Shortcode

I want to schedule removal of a menu page and shortcode from wordpress after a certain time period. I am using below code but neither shortcode nor menu gets removed after a time period. Below is my ...
0
votes
0answers
32 views

WordPress Scheduled Task Not Firing

I want to echo a string after a time period using WordPress scheduling. Below is my code in functions.php. Nothing gets printed through echo statement and also there is no error. Please guide what am ...
0
votes
1answer
49 views

WordPress: Cron locking and Queue

I have some CPU intensive scripts that I don't want to run concurrently. Every now and again the scripts will overlap and crash the server. Already at 2GB and the mysql container still crashes. I ...
1
vote
1answer
35 views

Cron While Editing Post

I have a multi-author blog, on which there are two schedule cron functions. The first function moves all public posts in the pending status after 365 days: if( ! wp_next_scheduled( '...
1
vote
1answer
23 views

How to periodically scrape and cache strings from remote txt files. - My First Plugin

I maintain a resource website, FilterLists, which is essentially a directory of txt files hosted around the net. I am trying to build my first WordPress plugin to (a) learn and (b) add a new feature ...
0
votes
0answers
27 views

flush_rewrite_rules with wp_cron

I'm trying to build myself a plugin for remote viewing data of all my WordPress installations in one overview. Therefore I'm generating a list using xmlrpc to remote connect to all the WordPress ...
0
votes
0answers
18 views

How to have a cron execute at a certain time on a certain day of the week

What's the best way to set a WP cron to fire once every Friday at 7PM EST? I know I could do something like the following, but if I understand correctly it will fire once right away, then reschedule a ...
0
votes
5answers
2k 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 ...
5
votes
1answer
113 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: register_activation_hook(...
0
votes
0answers
65 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
21 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 ...
11
votes
5answers
11k 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
52 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
1k 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
34 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
21 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?
1
vote
2answers
153 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
19 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
50 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
34 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
68 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
26 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
101 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
196 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
656 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
28 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
126 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
197 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
110 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 ...