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

learn more… | top users | synonyms

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
11 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 ...
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__', ...
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 ...
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 ...
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
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
51 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 ...
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
5answers
217 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 ...
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
73 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, ...
0
votes
1answer
44 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
31 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
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 ...
3
votes
1answer
82 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
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 ...
0
votes
1answer
58 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( ...
1
vote
1answer
58 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
40 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?
0
votes
1answer
33 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 ...
3
votes
1answer
71 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: ...
1
vote
1answer
43 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". ...
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
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. ...
0
votes
2answers
67 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'); ...
2
votes
1answer
43 views

Can't access wp_filesystem in cron function

I'm writing a plugin for integrating WP with Visma. It will basically spit out an XML file every third hour using wp cron (going to setup server cron for wp-cron.php on the live site) and save it to ...
0
votes
0answers
28 views

must save twice to trigger the wp_schedule_single_event

Code is as below. I set a custom field named sliderScheduledClosed stored a datetime. I want to schedule an event when I publish the post. add_action('publish_slider', 'IUI_schedule_event', 10, 1); ...
1
vote
0answers
58 views

wp cron job fires at every second or so, if callback is wrapped with DOING_CRON check it never fires at all

I am a bit lost while dealing with a open source plugin implementing wp cron. You can read about the problem on github https://github.com/nekojira/wp-currencies/issues/6#issuecomment-116735909 - I ...
0
votes
0answers
35 views

Trigger Cron Job

I've created a custom field called "auto_expiry_date" within a post type "collection". I'm trying to setup a cron job on a daily scheduled to check if a post has a "auto_expiry_date" older than the ...
0
votes
1answer
30 views

Is WP-Cron / wp_schedule_event suitable for time-consuming actions?

I want to schedule an action to be run daily. This action can take up to a few seconds. Question is: is WP-Cron the suitable mechanism (compared to, say, classic Unix cron) for such action? The ...
2
votes
1answer
147 views

Schedule WordPress Auto-Updates to only run during business hours

We've turned on WordPress Auto-Updates (yey!), but, just in case this does break anything, we'd like to only run Auto-Updates during daylight hours (e.g. 09:00 - 17:30). We have the "on init" WP-Cron ...
0
votes
1answer
90 views

Is it OK to use a system cron to trigger a function hooked into the AJAX API

I have a real cron job setup and it seems to work. I have outlined the basics below. The reason I ask is I don't see this method mentioned often and I'm wondering if that is because doing so is a bad ...
1
vote
0answers
40 views

Set post to unpublished after one week depending on condition

I have a post type with a custom field checkbox. If this checkbox is checked and the post is published, I want to unpublish when one week has passed since last modified date. How would I go about ...
0
votes
0answers
72 views

Post expire by gravity fields

I'm using gravity forms to let users publish some content from front-end. But I need to let then set expiration date. So I've installed Content Scheduler and Post Expirator plugins, because plugin's ...
0
votes
1answer
432 views

Sending email to all users

What is the best practice to send an email to a large number of users? I am developing a plugin for the website of an association and one of the things needed is to be able to send an email to all ...
0
votes
1answer
124 views

How to make WordPress emails async

I recently had an issue on my site where emails were failing to send. That was a problem, but the bigger problem was that the failure caused the script to timeout which really put a damper on the user ...
1
vote
1answer
84 views

WP cron doesn't pass through my arguments

I've been trying to import some posts trough a cron action. The problem is my last step. Everything is going well, except for the execution of the cron. It is only passing trough the first argument. ...