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

learn more… | top users | synonyms

0
votes
0answers
12 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
21 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
0answers
13 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
11 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
12 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
32 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
19 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
14 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
106 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
30 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
18 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
29 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
73 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
51 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
80 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. ...
0
votes
1answer
103 views

Best Way to get facebook share count and update using wp_schedule_event or any other method

I recently developed a news blog, and my client needs facebook share count. I Successfully able to get the share count and update the custom field using below code.(with the help of cybermeta). What ...
0
votes
1answer
46 views

No result update a custom field using wp_schedule_event

I recently developed a news blog. My client asked for a facebook share count of an article. I am able to get the share count using facebook api, However, according to the information I found from ...
0
votes
1answer
74 views

my wp schedule event is not working

function wp_cron_define(){ add_filter('cron_schedules', function($schedules){ $schedules['mine'] = array( 'interval' => 30, 'display' => 'once in a week' ...
0
votes
1answer
29 views

Detect each active instance of a widget

Is it possible to detect each active instance of a particular widget? As part of a plugin I'm working on, I want to run a for each loop on each widget instance Each widget is a Twitter feed and the ...
0
votes
1answer
26 views

Run Wordpress Plugin in the Specified time

I write the wordpress plugin . That Contains curl code... When I open wordpress site Ex(http://localhost/wordpress or http://localhost/wordpress/wp-admin ,...) this plugin running. But I Want Run ...
0
votes
0answers
34 views

Wordpress Multisite Cron Issue

I'm having some very weird cron issues. I was looking to run cron on a multisite subfolder install. And I user Debug Bar Cron plugin to see my cron jobs. I can see that the cron jobs are running fine ...
0
votes
1answer
411 views

Is there a known vulnerability for wp-cron.php?

I am using WordPress v.4.1 and all the plugins and the theme are up to date. I see in my log files too many of these... xxx.xxx.xxx.xxx - - [02/Jan/2015:13:30:27 +0200] "POST ...
3
votes
1answer
106 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 ...
1
vote
1answer
102 views

Schedule cron don't work

I try to set up a cronjob. It seems like it run the le_schedule function but not the le_do_this function. I also tried some cronjob plugins, some says it runs and some says it fails. In this case it ...
0
votes
0answers
41 views

wp_cron inside a class not correctly calling method

I have been trying this for a few hours today, reading a few different posts on the subject and several blog posts that each had their own method. I've managed to get the hook "recurring_cron_job" ...
3
votes
1answer
108 views

wp_schedule_event is executing but the function related to the hook is not running

I have an OOP plugin, The purpose of the plugin is to catch scheduled posts, save them in cron, then 2 minutes after they are published, to run a custom function on them. This is the stripped-down ...
0
votes
3answers
34 views

what effective ways are there to debug cron

Right now about 25% of the entries in my access log (which do not show resource like css, images, etc) are requests to wp-cron.php. I assume there is some process event that got "stuck" and keep ...
0
votes
1answer
64 views

How to know if a script started by wp_cron is still active?

I have a plugin that uses wp_cron to run jobs, these jobs are quite large sometimes and they seem to have stopped without any indication (0 errors in apache log as well as in the plugin's own log) So ...
0
votes
1answer
38 views

how to crate cronjo not depending on user access

i want to use wordpress cron job but it depending on user or admin entering the site, can i override this and make independnt cron on wordpress? now i use a simple timer when admin enter the admin ...
0
votes
0answers
23 views

Constantly schedule posts for two weeks in advance

I was wondering if there was a way to automatically and constantly have posts scheduled for two weeks in the future. Example: I have a post that I want published every Tuesday at 1pm, and I want ...
0
votes
1answer
46 views

Using cron for multiple queries

If I have something like the following in my single.php file (as a very basic example): <?php $a = the_field('test1'); ?> $b = the_field('test2'); ?> $c = the_field('test3'); ?> $d = ...
0
votes
2answers
70 views

WP-Cron function not firing

I am trying to get a simple php function working with cron (based on a tutorial). I have the following: <?php if (!wp_next_scheduled('please_just_work')) { wp_schedule_event( time(), 'daily', ...
3
votes
2answers
460 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 ...
0
votes
0answers
271 views

Automatically add custom fields (post_meta) to all published posts, hourly, via wp_cron?

I'm trying to update the post meta of all published posts hourly (via wp_cron) with the code below: if ( ! wp_next_scheduled( 'postviews_updatedcounts_hourly_event' ) ) { wp_schedule_event( ...
0
votes
0answers
18 views

Cron job disappering without notice?

I have a cron job (doing an sync against an external system) running every 10th minute in a multisite-install. For 2 out of 3 sites it is working perfectly. On the third site the scheduled job is ...
0
votes
1answer
207 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
70 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
50 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
80 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
45 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
259 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
86 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
42 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
1answer
81 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
51 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
174 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
496 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
28 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. ...
1
vote
1answer
389 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
70 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 ...