Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [cron]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

Fatal error on wordpress order update [closed]

Since a while we're experiencing some trouble when updating orders on our wordpress environment. This is the error log from wp-cron.log PHP Fatal error: Uncaught Exception: Invalid order. in /home/...
user avatar
  • 111
0 votes
0 answers
22 views

Unzip file in functions.php, and add it to cron

I have a file in the root folder of my wordpress installation (myfolder, wp-content, wp-config, and all other). I want unzip a test.zip archive in my myfolder folder in root directory. I try this ...
user avatar
0 votes
1 answer
39 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) ...
user avatar
0 votes
0 answers
36 views

Can/should we delete wordpress cron jobs with no action?

I find myself during a website creation where I try several plugins and delete them afterwards. However, some plugins do not clean their cronjobs and are left to be executed with no action. My ...
user avatar
0 votes
1 answer
56 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 ...
user avatar
0 votes
0 answers
14 views

Best Way to Enter Maintenance Mode Programmatically

I need the site to be in maintenance mode while I complete a cron job within a plugin. I have solved this by creating a ".maintenance" file in my plugin directory and using the following ...
user avatar
  • 131
0 votes
0 answers
18 views

Set up a WP Cron scheduled event to update calculated ACF field

I have 3 ACF fields set up on a custom post type: Number Value A - automatically updated every minute Number Value B - automatically updated every minute (at the same time as Value A) Number Value C - ...
user avatar
1 vote
1 answer
25 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)...
user avatar
  • 11
1 vote
1 answer
62 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, ...
user avatar
  • 63
0 votes
1 answer
147 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 ...
user avatar
0 votes
0 answers
33 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 ...
user avatar
  • 1
0 votes
0 answers
26 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 "...
user avatar
  • 396
0 votes
0 answers
40 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 ...
user avatar
1 vote
0 answers
79 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 ...
user avatar
0 votes
0 answers
53 views

WP Import All Multiple Dynamic Link Imports

What I’m trying to accomplish is to import the property details but they have a dynamic link. I need to get the property codes from this link -> https://api.supercontrol.co.uk/xml/filter3.asp?...
user avatar
  • 113
0 votes
1 answer
42 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 ...
user avatar
0 votes
0 answers
86 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 ...
user avatar
  • 131
1 vote
1 answer
51 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() { ...
user avatar
  • 11
0 votes
1 answer
34 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); $...
user avatar
  • 11
0 votes
0 answers
49 views

Running server cron job to update WP custom posts

I am using the WP Import plugin to import custom posts with custom taxonomies. All working properly. I see someone discussed a similar issue a few years ago but I couldn't find a solution to it. I am ...
user avatar
  • 1
0 votes
1 answer
54 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 ...
user avatar
0 votes
1 answer
132 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
user avatar
0 votes
1 answer
44 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 ...
user avatar
  • 143
0 votes
1 answer
20 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 ...
user avatar
0 votes
2 answers
85 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 ...
user avatar
0 votes
1 answer
51 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 * *...
user avatar
  • 1,894
0 votes
0 answers
33 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['...
user avatar
0 votes
0 answers
228 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(...
user avatar
  • 25
1 vote
0 answers
20 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 ...
user avatar
  • 11
0 votes
1 answer
252 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"])){ ...
user avatar
1 vote
1 answer
104 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('...
user avatar
0 votes
1 answer
160 views

How to run SQL query from Wordpress 'WP Crontrol' plugin

I have a SQL query which does exactly what I want if I run it directly in the database: UPDATE wp_pmpro_memberships_users SET wp_pmpro_memberships_users.status = 'admin_cancelled' WHERE ...
user avatar
0 votes
0 answers
21 views

What is the relationship between UFW (firewall) being enabled and cron job running?

I have a very specific problem on my server and can't wrap my head around it. I use BackUpWordpress as a backup solution for my site. Recently I noticed cron jobs were not firing properly to backup ...
user avatar
0 votes
1 answer
570 views

Cron jobs when running multiple instances on the same DB

I have a user using my plugin that has multiple AWS instances hosting WP and pointing to the same database. One of the jobs of my plugins is to run a large number of small jobs. I was thinking of ...
user avatar
  • 97
0 votes
1 answer
16 views

Is there a delay to include call function modification in a scheduled cron task?

I´m testing my cron task. I´m not sure but it seems to be the effect of a previous code. So, I´m wondering when you modify you call function and you run now your cron task (I´m using WP Control) and ...
user avatar
  • 770
0 votes
0 answers
44 views

How to pass variable from other function?

I want to pass the $job_id variable to the expire_job_featured function (for wp single cron event) but I don't know how can I do that. This is the full code of setting job's post meta value "...
user avatar
  • 1
0 votes
0 answers
153 views

Cron and request with wp_remote_post

I have a problem with a plugin I'm working on, I have implemented a cron that 2 times a day makes a call to update the data, the call is made with the wp_remote_post function. $response = ...
user avatar
0 votes
1 answer
25 views

Wordpress Console Application (ability to excecute a custom function via crontab only)

I have a few custom tables in the database and I need to clean expired data from time to time. If I was using WP-Cron, it would be easy, but WP-Cron sucks and is a no-go (especially for what I am ...
user avatar
0 votes
1 answer
34 views

Cron task with scheduled timestamp in the past

I´m doing some setting to enable/disable a cron task and choose a time to run this task. When I disable the cron task and enable it after without changed the time, my timestamp is in the past and make ...
user avatar
  • 770
0 votes
0 answers
162 views

Cron task gets removed from the schedule

I have a plugin which I have deployed on four different websites. Part of that extension is a Cron job which triggers every hour. On one of my deployments my job gets removed from the schedule. I ...
user avatar
  • 101
1 vote
0 answers
165 views

Manual Cron job occasionally outputting WP die message

I have some manual cron jobs running on my server hourly - they seem to generally fire fine, but occasionally they output the WP die message page html (see below) to the cron output logs which i have ...
user avatar
1 vote
1 answer
17 views

Cron job for creating posts not excecuting properly

I've written a PHP script to create custom posts programmatically from Google Calendar events, and an action hook that purges all existing events and repopulates it with current ones. This works fine ...
user avatar
0 votes
0 answers
344 views

Flush rewrite rules with scheduled event (cron)

I'm trying to flush rewrite rule with a wp_schedule_event function el_custom_cron_schedule( $schedules ) { $schedules['el_every_5mn'] = array( 'interval' => 5*60, 'display' =&...
user avatar
1 vote
0 answers
43 views

Programmatically save one/any post

I am using WP All import in order to import listings in a website. Everything works well except displaying all listings in a map. If i edit any listing, and then click Update (without making any ...
user avatar
  • 11
0 votes
0 answers
115 views

Use wp_remote_get() with a private or password protected page?

Is there any way to use the wp_remote_get() function to access a WordPress page that is either set to Private -OR- password protected (using the native password option in the post visibility settings)?...
user avatar
  • 509
0 votes
1 answer
39 views

How to Set a Condition via Page Template Name in WP Cron Job?

I have created a Cron Job Function. But, I can't set a condition for Cron Job. Basically I want Cron Job need to work if the Template File Name is page-delete.php So, How can I set Condition using ...
user avatar
0 votes
0 answers
287 views

Real cron killed my cron system. Only define( 'ALTERNATE_WP_CRON', true ); works

my host recommended me to disable wp cron for a real cron due to excessive executions. the cron system broken immediately and scheduled tasks were not happening. deleting real cron and turning on ...
user avatar
  • 1
1 vote
1 answer
859 views

Why is wp-cron only executing on page visit?

As I have understood wp-cron runs after a HTTP-Request to the given domain. Can someone explain to me why this is the case? I don't quite understand why the execution of (scheduled) wp-cron events are ...
user avatar
0 votes
1 answer
317 views

Server cron job not working

I want to setup server cron job for my WordPress website. This is what I have done so far. I added this line to my wp-config file. define('DISABLE_WP_CRON', true); I added this command for setting ...
user avatar
  • 469
0 votes
1 answer
75 views

my hook or my function wont run in the cronjob

i have made a cron job to run a function but the function wont run. i did run the code that is inside the function, outside to see if it works and it did, it just wont do nothing if inside the ...
user avatar

1
2 3 4 5 6