Questions tagged [cron]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
11 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
26 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
20 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
  • 113
0 votes
0 answers
16 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
  • 113
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
16 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
31 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
225 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
115 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
20 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
166 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
18 views

Custom cronjob not executing at all, but manually

In my themes function.php, I've added that code to load a custom code based on the cron: add_action( 'wp', 'schedule_test_cron' ); function schedule_test_cron() { if ( !wp_next_scheduled( 'test_cron'...
John_H_Smith's user avatar
0 votes
0 answers
18 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
132 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
27 views

Update last created post in custom post types with wp_cron()?

I have a question about wordpress cron job. I have created a website using elementor page builder. I made a form for client which my client used to send invoices to their clients. Once my client ...
The Adobe Teacher's user avatar
0 votes
0 answers
207 views

Error code 499 on specific cron job

I am getting error code 499 in my website's access logs. The site is built with WordPress. The logs are mostly coming from bg.googleusercontent.com which is I think google's analytics tool or some ...
aslamdoctor's user avatar
0 votes
1 answer
144 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
149 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
290 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
73 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,144
0 votes
1 answer
253 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
821 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
66 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
41 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
142 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
361 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
99 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
197 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
1 vote
1 answer
126 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
144 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
1k 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
271 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
204 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
  • 446
0 votes
0 answers
70 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
200 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
661 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
0 votes
0 answers
661 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
  • 131
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
55 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
171 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
530 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
59 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
43 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
325 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
195 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,939
0 votes
0 answers
121 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
579 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
49 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
0 votes
1 answer
803 views

How to force 'cron_schedules' every minute instead 1 hour?

I have a problem because I try to run my function every minute... And there are my two codes which I tried: function my_cron_schedules($schedules){ if(!isset($schedules["61sec"])){ ...
Dariusz's user avatar
1 vote
1 answer
237 views

Wp Maintenance mode and external cron job

I am using this code add_action( 'wp_loaded', function() { global $pagenow; // - - - - - - - - - - - - - - - - - - - - - - // Turn on/off you Maintenance Mode (true/false) define('...
Daniele As's user avatar

1
2 3 4 5
7