Skip to main content

Questions tagged [wp-cron]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

WP Cron is not running

I have disabled WP Cron using wp-config.php file because I need my custom tasks to run exactly on the hour. So my crontab file has this line to run the wp-cron on the hour 0 * * * * wget --delete-...
Desper's user avatar
  • 13
1 vote
2 answers
49 views

How can I cause run wp-cron to trigger sequentially?

I have a custom plugin that pulls in data from an API once per day at 2 AM. This mostly works fine, except that because I need to pull in the data in chunks, I keep running in to issues when I try to ...
JacobTheDev's user avatar
  • 1,253
0 votes
1 answer
38 views

Generate random number 1-10 upon registration without repeat

I have an event with 10 spaces available for booking. When a user registers for the event, I need to assign them a random draw number from 1 through 10. I will include this number in the confirmation ...
LBF's user avatar
  • 529
1 vote
0 answers
20 views

WP-Cron missing tasks after moving to server job

We moved our wp-cron off WP and over to a c-panel server job and in order to lessen our server load (which was high at the time) used 0,15 * * * * php -q /home/folder/public_html/wp-cron....
AdamAntLight's user avatar
0 votes
1 answer
23 views

Having difficulties with WP cron

I am having multiple problems with my simple testing cron snippet. First, it is not doing its job, which is updating theme option field. Second, when checking in the Cron Events plugin dashboard, ...
Tahi Reu's user avatar
  • 308
0 votes
0 answers
73 views

Start a long running PHP process via JS/Ajax and monitor progress on admin page

I am developing a plugin, which can import layouts for a certain theme from a remote URL. Those layouts often contain a good amount of images and sometimes even videos. I have a admin page where the ...
xxtesaxx's user avatar
  • 101
0 votes
0 answers
12 views

Action to create custom field based on shipping class works when manually triggered, but not on cron schedule

I am trying to schedule an action to run every minute to get the shipping class of all products and store it into a new custom field called product_shipping_class. The snippet below I saved using ...
roboes's user avatar
  • 101
1 vote
0 answers
26 views

change the time of the default wordpress crons

In WordPress this are some default crons as shown in the below image how can we able to update the default time of this crons for next run? Can we change using any hook ? Also can we change using WP-...
Dev Thakkar's user avatar
0 votes
0 answers
48 views

How to schedule Automatic Wordpress Core and specifics Plugins updates for specific time a day

Nowadays we are doing manually updates every 2 weeks in a test server, we test all plugins and if everything is ok. We deploy same file changes with Git in production server. Sometime we found some ...
Carlos's user avatar
  • 101
1 vote
0 answers
50 views

What is this async request in wordpress

There is an issue appearing with high admin-ajax async request can anyone explain what this does, what this request is? we have seen this multiple times but could not possibly debug or explain what ...
Hamza Mohammad Khan's user avatar
0 votes
2 answers
276 views

Checking wordpress cron hook for post and updates | what are the other cron values from wp-cli

Just wanted to ask how can we check which hook is being used for post updates or pages updates, as listing from wp cron event list, there are multiple crons but is there a wayu to recognize post and ...
Hamza Mohammad Khan's user avatar
0 votes
0 answers
88 views

Is there a technical difference between invoking `wp-cron.php` and using `wp cron event run`?

For years I've been running cron by setting DISABLE_WP_CRON to true in wp-config.php and then setting up a cron on my server that runs like this: * * * * * cd /path/to/site/public_html && /usr/...
shaune's user avatar
  • 101
0 votes
0 answers
19 views

What are scheduled callbacks?

I was taking a look at the inner workings of the Cron System, and found something odd: apparently, you can set a callback to event recurrence schedules. However, I can't find any documentation on that ...
Buzu's user avatar
  • 101
0 votes
0 answers
13 views

WP Cron based on array list

I've never used WP Cron in my life and I'm struggling with a task. I have the following array: $times = array(10:00, 15:00, 21:00); I need to schedule this times so I can call the enable_update() ...
Zagaz's user avatar
  • 11
0 votes
0 answers
150 views

Submit CF7 form programmatically with WP-Cron?

We need to check daily if our CF7 form is working properly (form submission data arrives to support's email). So i need a way to programmatically submit the form on frontend. I tried with WP-Cron but ...
Ion T's user avatar
  • 45
0 votes
1 answer
91 views

Cronjobs at night - but not the rest of the day

I have a cronjob, that at the moment runs hourly - I would probably prefer it to only run hourly between 2am and 5am. Is that possible with some kind of scheduling to tell Wordpress, that it is hourly ...
denlau's user avatar
  • 103
1 vote
1 answer
26 views

Cron Job not working

I am trying to trigger a function using cron job in a time interval of 1 minute but it is not working, am I missing something? register_activation_hook(__FILE__, 'my_event_recurring_activation'); ...
v morgesh's user avatar
1 vote
2 answers
181 views

Function attached to cron job not running but will run if called manually

I have a cron job set up with the following code in my functions.php file I have a CPT with a custom field that defines an expiration date for each post. All I am doing is checking if the date has ...
grzybowski1911's user avatar
0 votes
1 answer
142 views

Wordpress "wp cron event run" as Siteground cron job

Is there a syntax that will allow me to run "wp cron event run" as a Siteground cron job? I found this example that runs through a third party application. I'm wondering if this command can ...
Rip's user avatar
  • 3
0 votes
1 answer
121 views

Execute scheduled cron with ajax call to wp-cron.php

According to this question where my doubt on how to schedule an email sending each 24 hours, I've modified my plugin code to use a custom action hook and the wp_schedule_single_event() to achive the ...
OHICT's user avatar
  • 133
0 votes
0 answers
76 views

Wordpress Cron job hook running multiple times

Here is my code in its basic form for a wp cron job I want to run only once daily: add_filter('cron_schedules', function ($schedules) { $schedules['daily_reminder_check'] = array( '...
MikeeeG's user avatar
  • 135
0 votes
1 answer
27 views

CPU Overloading due to some hooks

I have some functions restricted in some hooks. The purpose of these hooks was to have consistent author name in the DB(which is a product attribute) and also update the display name. I placed this in ...
Varun Muchanapally's user avatar
2 votes
1 answer
46 views

Cron Register everytime if i reload admin if i pass some extra argument in wp_schedule_event function

Cron Register everytime if i reload admin if i pass some extra argument in wp_schedule_event function. Here you can check the scrrenshot I have checked the cron using the plugin WP Control. function ...
Prits's user avatar
  • 278
3 votes
0 answers
267 views

How to find code responsible for warnings from wp_cron runs?

I have a website created using wordpress, which is hosted on accuwebhosting.com Recently I have been getting emails with the subject line "Cron user@server cd wpfolder && /usr/local/bin/...
noravanq's user avatar
3 votes
2 answers
2k views

wp_schedule_single_event not working

I don't know why my scheduled cron events not working anymore, it used to before with the same code. I wrote a plugin that updates a CRM with the order note, if the communication fails I setup a ...
odedta's user avatar
  • 96
0 votes
0 answers
24 views

WordPress Cron Job not importing products

I think this issue is related to WordPres Cron System , because the function runs fine without cron but it doesn't work as expected when run via cron , please have a look : https://wordpress.org/...
rawaha johns's user avatar
0 votes
1 answer
613 views

What is the correct way to implement wp-cron server-side in Kubernetes?

I'm not sure if this is the correct place to ask the question, but since this is specific to deploying WordPress, I thought I'd ask here first. What is the correct way to implement wp-cron server-side ...
JakGuru's user avatar
0 votes
0 answers
499 views

Protect wp-cron from hackers

I would like to get help on protecting wp-cron against hackers. Set up: Lightsail Bitnami Apache server, headless Wordpress CMS, frontend is on AWS Amplify. My wp-admin folder is protected with ...
David Simon's user avatar
0 votes
0 answers
50 views

Not getting expected email when running cron hook

I'm following the tutorial at https://wpshout.com/wp_schedule_event-examples/ I want to ensure my cron job works and is run at approximately a certain time of day. I have inserted debug code to send ...
StevieD's user avatar
  • 211
0 votes
1 answer
289 views

‘wp_site_health_scheduled_check’ Causes Failure Of Other Scripts

I introduced a heartbeat monitoring system on all my websites late last year. The system involves using a wp-cron action to send a GET request to an API hosted by Better Uptime, triggered by crontab ...
David Adams's user avatar
0 votes
0 answers
68 views

Running a function using Crown WordPress on one day a week, for example, Mondays of every week

Hello friends I am trying to write a plugin to be able to publish a post on a specific day. I need to be able to publish a specific text as a post on Mondays every week. The searches I did on the ...
Fardad Farhang's user avatar
1 vote
0 answers
71 views

Definition of page load for WP-Cron?

My site is extremely low traffic for the time being. For the sake of this question, let us assume it is no traffic. I have a .php file on my server which is executed every five minutes via crontab on ...
Dwest's user avatar
  • 11
0 votes
1 answer
125 views

HELP: Code To Check Status And Write Debug Entry

I use a simple function to send out a 'heartbeat' to a website uptime monitoring service (Better Uptime): function my_better_uptime_heartbeat() { wp_remote_get( 'https://betteruptime.com/api/v1/...
David Adams's user avatar
0 votes
1 answer
230 views

wp_schedule_event with dynamic names but same function

I am creating a plugin where I am getting records from the database and dynamically creating events with wp_schedule_event, some sample names: ls00_lorem ls00_john_doe ls00_jane_doe I am them ...
Ronald's user avatar
  • 43
0 votes
1 answer
295 views

WP CRON Fails At 13:00 Every Day

TL;DR; Advice please on troubleshooting this issue I have setup a real CRON scheduler (linux crontab) instead of relying on wp-cron scheduling - further info here. All it does is reliably initiate any ...
David Adams's user avatar
0 votes
1 answer
628 views

understanding wp_next_scheduled

I have a function that I've been attempting to get to work with wp_schedule_event. The function sends a notification to the admin. I see the event get added to the wp cron event list, but it never ...
Cody's user avatar
  • 1
1 vote
1 answer
2k views

Change a Post's Status based on the date from a custom field? (for Event posts)

I've found many posts on this topic and tried to use their solution, but none has worked so far... I have an Event custom post type with an event_end_date custom field. I'm trying to create a PHP ...
nomade0's user avatar
  • 27
1 vote
1 answer
455 views

Working function() doesn't execute when triggered by WP CRON

I've built the following before and have referenced my own code to see if I missed anything and from what I can tell I have not. I have a WP CRON scheduled and it executes as the scheduled intervals. ...
Tony Djukic's user avatar
  • 2,259
0 votes
0 answers
91 views

Update post meta with wp cron

I am trying to create a function (which I will trigger through the WP Cron) but no values are passed and the database values remain NULL. Could anyone point me in the right direction of where I'm ...
Rein's user avatar
  • 1
0 votes
0 answers
98 views

Error resetting database index using ALTER TABLE in $wpdb->query

I'm running a Cron job every hour that clears all posts of a particular CPT and then re-inserts data by accessing a third party API. I'm worried that this will lead to huge indexes, so I would like to ...
clayRay's user avatar
  • 135
1 vote
1 answer
340 views

Does DISABLE_WP_CRON prevent plugins from registering new cron tasks?

If I set DISABLE_WP_CRON to true in my wp-config.php file, then will it block plugins from registering new cron events (eg with calls to wp_schedule_event()) define( 'DISABLE_WP_CRON', true ); I've ...
Michael Altfield's user avatar
1 vote
0 answers
438 views

How to know if WP cron is currently running my hook?

I have an action that calls a function which takes about 20 seconds to complete (uploading file to remote server). How can I code it in such a way so that it could check if WP cron is running the same ...
ratib90486's user avatar
1 vote
0 answers
2k views

wp_privacy_delete_old_export_files, failed to run

The scheduled event, wp_privacy_delete_old_export_files, failed to run. Your site still works, but this may indicate that scheduling posts or automated updates may not work as intended.
Ashish's user avatar
  • 111
0 votes
1 answer
136 views

Cron event running more than once if triggered from WP Crontrol

This is just a sample plugin I created in order to track this issue down in a real plugin, but I am experience the same behavior: <?php // cron-test.php /** * Author: me * Description: CRON Test ...
Cyclonecode's user avatar
  • 1,164
3 votes
2 answers
2k views

Running one-off cron jobs when WP_DISABLE_CRON is true: can I hit /wp-cron.php?

I have a plugin that needs to do a "database update" sort of operation, going through all users and performing a particular database operation on each one. It's designed for sites with large ...
O. Jones's user avatar
  • 481
0 votes
1 answer
16 views

WordPress cron creation during plugin installation results with initial execution

I'm currently developing a plugin which uses WP cron. During the installation of the plugin, I'm creating 2 needed cron jobs with a timestamp of midnight -2 and a and midnight -1 hour, since job 2 ...
Johnny97's user avatar
  • 214
0 votes
0 answers
511 views

Wordpress cron job running more than once

I developed a plugin to read some XML files and publish their itens as post but for some reason, sometimes, it is duplicating posts. Basically that is what I have: // function one is scheduled (hourly)...
José Leonardo's user avatar
0 votes
1 answer
386 views

Scheduling an event inside plugin class is not working

wp_schedule_single_event is not firing. I wrote a function that is posting to external API, if it failed I schedule the same posting function to run 5 seconds later in cases of timeouts. Here's the ...
odedta's user avatar
  • 96
0 votes
1 answer
6k views

When running WordPress Cron manually, it shows WP-Cron spawning is disabled. What is WP-Cron spawning?

I use Ubuntu 20.04 LEMP stack VPS. In this server, I run 13 WordPress sites. Every 10 minutes I have set up to run each site cron job with a 20 seconds interval. So every site does not execute cron ...
Chathu's user avatar
  • 15
0 votes
1 answer
153 views

How to execute add_action() function from custom plugin to Crontrol plugin or do_action()?

I created a custom plugin and I need to schedule add_action using Crontrol Plugin, the Setup class is from different php class. But the schedule action cant read the Crontrol even if I execute ...
JuniorA's user avatar

1
2 3 4 5
10