Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [cron]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 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
16 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
37 views

Uncaught DivisionbyZeroError: Wp_reschedule_event

I've really been struggling with my wordpress running smoothly and have been constantly dealing with a variety of issues. One thing that i continue to experience is Cron scheduled tasks will end up ...
Ronnie Free's user avatar
0 votes
0 answers
7 views

Scheduled parsing of XML feed into wp_insert_post()

I coded a custom theme that parses and imports into a CPT the content of some multi page XML feeds. This it the current workflow: daily action scheduled for 2am with action-scheduler to process all ...
Mihai Papuc's user avatar
0 votes
0 answers
14 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
1 vote
1 answer
22 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
0 votes
1 answer
78 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
74 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 ...
ICTDEV's user avatar
  • 133
0 votes
0 answers
25 views

How to get cron name which calls my function

I need to send to users who have birthdays an email with a coupon, and I don't want the emails to be sent in very quick succession. I want to send them in 1 second intervals. I implemented the idea of ...
Vlado's user avatar
  • 111
0 votes
0 answers
14 views

WP Cron, how to speed it up

On my site, I have quite a few cron jobs running. Everything is running smoothly, except the cron jobs end up queuing all time. My server load is only at 40%, so I assume I can handle more cron jobs ...
Mads's user avatar
  • 1
0 votes
1 answer
23 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
40 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
0 votes
0 answers
818 views

How to run cronjobs in WordPress on docker

I am running a WordPress site in a docker container. The site works but the cronjobs do not run so I downloaded crontrol to get a GUI into crontab so I could confirm that the jobs existed and I see ...
steve8094's user avatar
-1 votes
1 answer
263 views

Should I run wp cron event run via crontab or as a daemon?

In my server I've run: sudo -u www-data wp cron event run --path=/var/www/blog.example.com --all But I do not know should I run wordpress cron using crontab or make it into a service using systemd ...
Dimitrios Desyllas's user avatar
0 votes
0 answers
21 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
381 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
19 views

Creating a background process that doesn't need HTTP

I want to fetch data from an ERP system and use that to fill the Woocommerce products. This operation is quite memory intensive and lengthy. So I'd like to run this through a cron that just calls a ...
Guido Goluke's user avatar
0 votes
1 answer
204 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
1 answer
204 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
1 vote
1 answer
235 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
0 votes
0 answers
341 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
0 votes
1 answer
110 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
0 votes
1 answer
299 views

wp_mail sending only once inside foreach loop

I have written and re-written this code several times. I've tried removing the wp_mail function from the loop and putting it in it's own function. I've moved all the variables in to the loop. At one ...
Hylland's user avatar
2 votes
2 answers
1k 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
  • 471
0 votes
0 answers
85 views

Certain lines added to our wp-config.php file are being removed, every day

It seems that certain lines added to our wp-config.php file are being removed, every day at 01:00. The line that's being removed is define('WP_ENVIRONMENT_TYPE', 'staging'); Which is added just ...
Ralpharama's user avatar
0 votes
0 answers
47 views

3,840 cronjobs with no action!

I have a site which constantly has nearly 4,000 cronjobs with no action. If I delete a number of these jobs they come right back, generally to the same number. I've tried switching back to the Twenty ...
Sandbox Wizard's user avatar
0 votes
0 answers
191 views

How can i find the cron jobs that run on my site and then move them to the server side?

I am trying to find all the cron jobs on my site and then, move them to the server-side, as my hosting provider gives me the option, to schedule them on the server. I am aware of some plugins like ...
Efstef's user avatar
  • 11
0 votes
0 answers
454 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
192 views

Auto Delete Users (auto_delete_users)

I need some help cause I couldn't find any solution for my problem and haven't the knowledge to solve the problem on my own. What I'm trying to do: I want to delte every WordPress user (subscriber) ...
Still Ready's user avatar
0 votes
1 answer
209 views

How to run wp_insert_post() & wpdb on the background?

I have created a code to fetch data from a remote API then echo certain data & import those data into a post type using wp_insert_post() & post meta** using wpdb->query(). Here's my current ...
Amenadiel's user avatar
  • 125
1 vote
1 answer
162 views

Does using WP-cron make the site slower for the user?

Forgive my "beginnerness" in this matter but I have 2 options to trigger a heavy task (massive update on users' properties to solve an issue between 2 plugins that weren't meant to cooperate)...
Iago's user avatar
  • 11
1 vote
1 answer
150 views

File Type Is Not Permitted - Cronjob

I am currently developing a cron job that downloads a xml file from an external source and stores it within wordpress media. For debugging proposals, I have installed the plugin Advanced Cron Manager, ...
Basti's user avatar
  • 63
0 votes
1 answer
2k views

Time limit on long cron job?

I'm working on a membership system which is going to process renewal payments. If I use set_time_limit(0) inside the wp_schedule_event (cron) function, is that enough to ensure that it has the time it ...
Chad Reitsma's user avatar
0 votes
0 answers
295 views

WP Cron Working, but Function Not Working

I have a plugin I built for events. I set up the plugin with WP Cron to run a function. The function checks the events posts to see if it's recurring then if the start date has passed it updates the ...
Jackie's user avatar
  • 1
0 votes
0 answers
221 views

Solution for processing lots of data with CRON/API, dealing with memory/timeout issues

Using a custom CRON job set up in my Wordpress site I am connecting to an external API to refresh some data. The API only allows for a certain amount of records to be read at a time so I have to "...
Louis W's user avatar
  • 454
0 votes
0 answers
73 views

Run function with schedule is not working correctly

i´m trying to run a function with a schedule but the response is empty. I am developing a plugin where i will send a json encoded array to my IoT service. The service is fine. All other functions are ...
nukleuz's user avatar
1 vote
0 answers
247 views

export a csv file from the database with a cronjob

I'm using an event plugin, which doesn't have a user-friendly function for showing a list of bookings. That's why I wrote a php+js script myself to display that data in a nice way. But to use my own ...
mathiflip's user avatar
0 votes
1 answer
1k views

Strange cron job behavior and how to solve it?

My site health said cron evens has missed schedule, so I installed “Wp control” plugin to check the cron evens. Normally “next run” will show the future time, but in my case it shows a time in the ...
Duke Yin's user avatar
1 vote
0 answers
969 views

Wordpress cron not getting executed when called by external service (but ok from browser)

I'm trying to set up an external cron service to run cron in my WP site. I have disabled WP's own cron using define('DISABLE_WP_CRON', true); in wp-config.php. As for the URL to call from the external ...
Albert's user avatar
  • 141
1 vote
1 answer
61 views

Update Content based on expiration time or queued processing

every hour by cron, I call a function that updates the contents. If on post have custom field with auto,so work.(to distinguish it from those written manually). function aggiorna_dati() { ...
Dan's user avatar
  • 11
0 votes
1 answer
56 views

Cron: Update four post at Hour

I have function that update post content automatically based from custom field like this: function update_content(){ $mycustomfield = get_post_meta( get_the_ID(), 'customfield', true); $...
Dan's user avatar
  • 11
0 votes
1 answer
212 views

Bulk updating a group of WordPress Pages every 10 minutes

I need to bulk update 86 specific WordPress Pages every 10 minutes, with the term updating I mean the same thing as clicking the Blue Update Button on each page, and having them all update at the same ...
jhonny4's user avatar
0 votes
1 answer
646 views

Activate Plugin Automatically After Set Time

please how do I activate a plugin after a set period of time automatically. For example, let's say I want to activate Jetpack automatically after 3 weeks. Thanks
Cinnia Entertainment's user avatar
0 votes
1 answer
68 views

How to protect a script execution on Wordpress?

Recently I have created a script to update records on my Wordpress database. I basically use wpdb to connect to another database, grap some records, and update the Wordpress database. Using only ...
churros's user avatar
  • 143
0 votes
1 answer
50 views

Cron job to change CPT

I'm hoping to write a cron to automatically change the custom post type for any items that match a particular CPT each night at midnight. For instance: I have a CPT called "members," but at ...
Don Day's user avatar
0 votes
2 answers
385 views

Large Wordpress CRON job

I'm programming the integration with external API (real estate). I have one CRON job which is planned for at 1 o'clock am. It's running very well because I'm using server CRON initialize instead WP ...
Daniel Kozina's user avatar
0 votes
1 answer
254 views

Manually running cron from the server

I have a staging server begind basic auth and I'd like to run system cron instead of WordPress 'cron'. I've placed the define('DISABLE_WP_CRON', true); in my wp-config.php, and first I've added */5 * *...
dingo_d's user avatar
  • 1,950
0 votes
0 answers
151 views

Wp_Schedule_Event every few minutes doesn't work

I wrote the folowing timer in my function.php file. It should be called every certain time (3 minutes) but it doesn't work at all. function myprefix_custom_cron_schedule( $schedules ) { $schedules['...
Nabil Dabbagh's user avatar
0 votes
0 answers
623 views

Setting up a cron job to auto update a custom field

I need help to setup a cron job to update a custom field (created with Advanced Custom Field) every 8 hours. This is the function to define the custom time schedule: function cron_schedule_eight_hours(...
level7's user avatar
  • 25
1 vote
0 answers
55 views

Scheduling update post daily

I have created a function to change the post category to archive after expiry date. And it will update every time when I save a post. But the question is that how can I schedule an update for posts ...
gabriel's user avatar
  • 11

1
2 3 4 5
7