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

learn more… | top users | synonyms

0
votes
1answer
19 views

automatic send email at custom time

I want to send an automatic email every day at 10:00 I tried this code $timeN = date('H:i'); $timeS = date('10:00'); if ($timeS == $timeN) { $to = get_option('admin_email'); $nfrom = "my ...
0
votes
0answers
12 views

Custom Event for Wordpress Cron Job Not executing

Method to Execute at Certain Interval function informant_main_action(){ die('working'); } Custom Schedule for Cron Job function my_cron_definer($schedules){ $schedules['weekly'] = ...
0
votes
2answers
22 views

How to make a cronjob type plugin

Hi i am new on wordpress and has been given a task to make such a script that will fetch posts by categories and shoot email to subscribers. The table structure for subscriber is below Subscriber Id ...
0
votes
0answers
15 views

wp_next_scheduled not working with variables

Here is the code: <?php while ($parent->have_posts() ) : $parent->the_post(); ?> <?php $timi = get_field('timi', $post->ID); ?> <?php $timi2 = $timi / 2; ...
0
votes
0answers
18 views

How do i set cron job for my WordPress site?

My target is to run a file to be executed on each day whether the WordPress site runs or not. How to execute cron file? I have got stuck in this is issue. This is new task for me and i don't got ...
2
votes
1answer
128 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
3answers
52 views

setting up a wp cron job

I am a bit new to wp-cron job. I think i understand the concept but lack the implementation. i read a lot of tutorials on how to implement including this post: Run function at specific time but still ...
0
votes
0answers
29 views

Cron job not firing

I'm having this problem where cron jobs doens't seem to post delayed posts.. I'm using this cron job wget -O /dev/null http://domain.com/wp-cron.php?doing_wp_cron Am i doing something wrong?
0
votes
0answers
19 views

Cron job to delete post by title

I've searched a lot and I didn't find nothing that could help me. So, I want a cron job to automatically delete posts that have no title. Why I want that? I have a IFTTT recipe that automatically post ...
0
votes
1answer
40 views

Display a random tag but using cron to control frequency of change

Background - I have created a shortcode in functions.php which adds a single random tag with it's link and description to a widget in my sidebar. This is my existing code... function ...
0
votes
0answers
26 views

Scheduled event occurring each page load, but supposed to happen daily

I have a scheduled event that is supposed to occur only once a day at 12am. However, for some reason my scheduled event is happening on each page load and I can't figure out why. The default ...
1
vote
1answer
92 views

How to Better Control WordPress Cron Jobs?

I have a bunch of standalone WordPress sites, and WordPress Multisite Network of Sites on my server. There are times where there are too many sites all running cron jobs too soon in proximity. I am ...
4
votes
1answer
225 views

wp_delete_auto_drafts() deletes links in menus

Since yesterday the wp_scheduled_auto_draft_delete cron job somehow deletes all page entries from our menus. All entries in the table wp_postmeta with meta_key = '_menu_item_object' and meta_value = ...
0
votes
2answers
23 views

Pages for Cron use Only?

so I've got a bunch of custom page templates that are scripts that are meant to be run by cron to update various things on my wordpress site, there are not meant to be viewed by regular site users. ...
0
votes
0answers
39 views

Expire a post with meta_value after two weeks

I am trying to use the below code to query for some posts and then change a meta_value in order to "expire" it after two weeks time. I can't get this to work and it's difficult to test since I can ...
1
vote
1answer
104 views

When to use wp_schedule_single_event for async / non-blocking processes?

I have noticed this pattern in some plugins lately: <?php function MY_CRON(){ wp_schedule_single_event(time(), 'MY_ACTION'); } add_action('save_post', 'MY_CRON'); function MY_FUNCTION(){ // ...
0
votes
0answers
42 views

custom cron interval is not working

I am trying to create custom interval for cron schedule with below code but it is not working, function cronschedules($schedules) { $schedules['custom'] = array( 'interval' => 36000, // seconds ...
0
votes
1answer
52 views

Custom interval is not working

I am trying to create custom interval for cron schedule with given user input, but its not working. Here is the code: add_filter( 'cron_schedules', 'custom_cron_schedule' ); function ...
2
votes
1answer
115 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
0answers
52 views

WP Cron debug issue - running on staging, not on live

I realised a plugin's wordpress cron wasn't running on my live site, so I installed WP Debug Cron to investigate the issue. All the custom and core events show Next Execution as being in the past. In ...
0
votes
1answer
68 views

Issue with wp_schedule_event()

I am trying to set up an event on a custom interval that will grab new posts from an Instagram search and create them as wordpress posts. I had the code working on its own page, and now I am trying to ...
0
votes
0answers
71 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
1answer
90 views

wp-cron still running even though DISABLE_WP_CRON is true

I have created a cron job to run wp-cron.php for me but I am seeing in my FPM logs where it's still running. From what I understand, is that with the cron job it wouldn't be hitting FPM to create any ...
5
votes
1answer
192 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
18 views

Save automatically data to user profile once or twice a day [duplicate]

The main goal : I am working on a panel which will display statistics of my user websites (external website). For that, I use the Google Analytics API. I save the Google Analytics profile number in a ...
0
votes
1answer
113 views

What is the use of wp_schedule_event hook?

I want to do a cron(executes function at specific time, like email,db backup etc) job. I searched in wordpress, i got this wp_schedule_event Here they say it will execute job when someone visits ...
0
votes
1answer
132 views

WP Cron: Save third party data as user meta

Editors note: Twitter ID and Google Analytics only serve as examples and are exchangeable. TL;DR I want to save external data in a user profile once or twice a day. I added two custom fields in my ...
0
votes
1answer
291 views

Make posts automatically from an Online XML file through wp cron job

I want to import posts from a RSS feed using the WP Cron API. Here is the link to the XML Feed. I activated different Feed Aggregator wordpress plugin but it gives error. Problem: FeedWordPress ...
1
vote
1answer
96 views

WP_Cron script not updating all posts in loop

I've had an issue with this piece of script for a month now http://pastebin.com/f6LqgqQS. What the script is supposed to do is loop through all my posts, pull the like count from the facebook graph ...
0
votes
0answers
137 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
54 views

what is firing cron

I've been having problems while trying to setup a simple cronjob. A lot of the WordPress tutorials like this one http://tommcfarlin.com/wordpress-cron-jobs/ specify a crontab with some time schedule ...
1
vote
1answer
219 views

Getting this code to work in Multisite

I'd like to run this code via cron on multisite. When I use the admin_init hook the code executes and works perfectly, deleting the blogs, however when I set it as a cron, and then run the event with ...
0
votes
0answers
90 views

Cron Lock Timeout, when to use?

When is it a good idea to use this constant in relation to WordPress Cron? WP_CRON_LOCK_TIMEOUT
0
votes
1answer
202 views

Do WordPress cron jobs slow down page loading?

If a user visits a site and his visit triggers a cron job that is quite intensive, the page load speed will be slower for him right? As I understand the page doesn't wait for the cron job to execute ...
0
votes
1answer
92 views

Cron jobs repeating themselves

If I have a function set to run every 5 minutes via a WP cron job, and I have only one visitor during a day, does his visit trigger just one run of that function or all the runs that have been amassed ...
0
votes
0answers
25 views

Break a Wordpress function to run in patches and re-continue

I am new to PHP and coding and I am really not a coder but I try to modify and use existing codes. I have a function which I am trying to run when needed for all users within Wordpress to do an ...
0
votes
0answers
67 views

wp_schedule_single_event running twice

I have set up a meta box with a checkbox, so when checked and the post is saved, a scheduled event is registered to send an email to all users (around 1200) in the background. Sometimes the emails ...
0
votes
1answer
232 views

set post to draft after set period based on post_modified date

I have a custom post type for a users 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
0answers
227 views

Using wp_cron with wp_mail to send bulk email

I am working on a custom plugin to send recurring invoices on the 1st of every month. So far, the plugin is working pretty well. It creates new invoices for each user based on their order and does ...
0
votes
2answers
30 views

Hook/Cron Problem

I have this fuction in my fuctions.php <?php if ( !wp_next_scheduled('re-post2') ) { wp_schedule_event( time(), 'hourly', 'rep-post2' ); } function repostads() { global $wpdb; $querystr ...
0
votes
1answer
258 views

Adding custom cron_schedule prior to wp_schedule_event

I am trying to add a custom cron_schedule interval inside a plugin and then use that custom interval to schedule a cron event when the plugin is activated. It seems that the custom interval is not ...
0
votes
1answer
39 views

How can I prove if wp cron is running my task if I have DISABLE_WP_CRON set to true

I am trying to trigger a wp cron task via a real (linux) server cron and have followed online instructions to add this to wp-config: define('DISABLE_WP_CRON', true); My cron job does this : wget ...
0
votes
1answer
61 views

Using a Cron Job to dynamically populate a field ONCE, and then making the field blank the next time someone visits page

I'm probably going to butcher explaining what I'm trying to do, so bare with me. Essentially I'm working on a custom Contest type of solution for a client. I'm using Gravity Forms for the users to ...
0
votes
1answer
85 views

Manually trigger a wp_schedule_event item?

I have successfully added an event via wp_schedule_event and I'd like to trigger it manually without disrupting the existing schedule. Is there a way to tell WP to execute an event immediately ...
0
votes
0answers
29 views

Daily class register with monthly invoicing

I'm about to take on the task of creating a daily class register the features of which I have listed below. I am mostly a novice when it comes to wordpress development and I can do some PHP ...
1
vote
0answers
57 views

Get frequency of scheduled event

How do I get the frequency of a scheduled event? I am writing a plugin, that would do something in a user defined schedule. The way I am trying to do this, is creating a custom cron schedule, which ...
0
votes
0answers
31 views

Trigger scheduled cron events upon logged-in user visit

I am building an entirely private site where only the wp-login.php page can be viewed by non-logged-in users. After an entire day of debugging I've come to realize that non-logged-in user visits are ...
0
votes
0answers
50 views

WooCommerce Emails Firing Multiple TImes

I am having a problem with my WooCommerce install where order update emails (which I think are scheduled using WP Cron??) are fired multiple times - some times as many as 7 or 8. Would it be WPCron ...
0
votes
0answers
35 views

Wordpress Cron Job Counting Up and Not Down

I'm having a strange problem in which a WP Cron Job is counting "up" and not "down". Thus the job never runs. What I mean exactly should be clear from these outputs: [19-Sep-2013 23:33:51 UTC] ...
0
votes
1answer
71 views

Regenerating array key for wp_schedule_event args

I've been working on this the last day with no luck. Is there any way to update a stored args array key for an event scheduled? Reason I ask is I have array args that look like this when scheduling a ...