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

learn more… | top users | synonyms

0
votes
1answer
511 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
0answers
8 views

Empty temp image folder daily using wp_cron

I have a folder on my server that holds temporary images. I would like to empty this folder daily to free up space. I am using the following cron job: add_action('images_event', 'images_weekly'); ...
0
votes
1answer
51 views
+50

“Missed schedule” posting bug

I have a low traffic WordPress (4.5.3) site at http://brandgrowmedia.ca/. When a blog post is scheduled, it frequently (~80% of the time) does not post and is marked as "Missed schedule". I looked ...
0
votes
2answers
868 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 ...
2
votes
1answer
418 views

Send email daily from WordPress site

I customized a calendar plugin which shows today's birthdays and current month's list of wedding anniversaries in the home page of the site. I wrote a code in that plugin's displaying page using ...
0
votes
1answer
33 views

Reset/delete post views meta/custom field after X hours or minutes or seconds

There's lots of snippets and plugins that will count post views but I'm trying to find a way a way to reset the number of views back to zero after X hours(or minutes or seconds or whatevaaaa). I'm ...
1
vote
4answers
550 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 ...
4
votes
1answer
573 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 ( ! ...
6
votes
2answers
11k 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 ...
0
votes
0answers
16 views

Wordpress cron job not working for me

I have write a code to run cron interval 5 seconds. but I cant see any update from it, I can see the cron is running but action function isn't work. Please check and give me a solution, // interval 5 ...
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
633 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
786 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
557 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
51 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. ...
2
votes
0answers
15 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
28 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
10 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 ...
4
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
32 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
28 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
234 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
382 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
33 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
105 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
30 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
69 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
33 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
57 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
37 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
26 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
30 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
19 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
117 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
66 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
23 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
57 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 '...
4
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
35 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
22 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
173 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
24 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
56 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 ...