Questions tagged [cron]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
34 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 ...
1
vote
0answers
21 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 ...
0
votes
0answers
13 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?...
0
votes
1answer
19 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 ...
0
votes
0answers
24 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 ...
1
vote
1answer
47 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() { ...
0
votes
1answer
23 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); $...
0
votes
0answers
28 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 ...
0
votes
1answer
40 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 ...
0
votes
1answer
51 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
-1
votes
0answers
15 views

I want to know a CRON command to refresh a specific page twice a day

Basically I am using c-panel to add a new cron job I have wp-booking calender integrated with a page and I want that age to be refreshed twice a day automatically so that it can import the bookings ...
0
votes
0answers
33 views

Auto Update all the posts of specific Custom Post Type

In one of my Clients website, they were using Awesome Gallery in their posts. They wanted to use custom gallery so, I provided them with a custom post type gallery. The main huddle here was ...
0
votes
1answer
31 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 ...
0
votes
1answer
16 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 ...
0
votes
0answers
20 views

Wordpress schedule event function not running

I am totally new with the schedule event from Wordpress. For my theme I created a function that must run every minute. To test my scheduler I created a test function that send me an email. But I do ...
0
votes
2answers
40 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 ...
0
votes
1answer
31 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 * *...
0
votes
0answers
26 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['...
0
votes
0answers
108 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(...
1
vote
0answers
13 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 ...
0
votes
1answer
93 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"])){ ...
1
vote
1answer
58 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('...
0
votes
1answer
78 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 ...
0
votes
0answers
15 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 ...
0
votes
1answer
361 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 ...
0
votes
1answer
14 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 ...
0
votes
0answers
23 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 "...
0
votes
0answers
89 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 = ...
0
votes
1answer
20 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 ...
0
votes
1answer
25 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 ...
0
votes
0answers
114 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 ...
0
votes
0answers
109 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 ...
1
vote
1answer
14 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 ...
0
votes
1answer
234 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' =&...
1
vote
0answers
36 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 ...
0
votes
0answers
96 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)?...
0
votes
1answer
23 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 ...
0
votes
0answers
214 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 ...
1
vote
1answer
599 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 ...
0
votes
1answer
220 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 ...
0
votes
1answer
51 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 ...
0
votes
0answers
270 views

execute cron jobs when .htaccess login protected?

My client is not able to execute cron-jobs in his wordpress dashboard because he gets 401 not authorized. This is because he has an .htacess file blocking normal access to the site (it's a member ...
0
votes
1answer
17 views

Cron job shedules replace?

I was watching this: Wp_Schedule_Event every day at specific time and im wondering if I do the following will it replace all my schedules? function myprefix_custom_cron_schedule( $schedules ) { $...
1
vote
0answers
186 views

wp_schedule_single_event not working: cron job is triggered but nothing gets executed

I'm trying to execute a piece of code asynchronous. I tried to use wp_schedule_single_event like this in my WP plugin: function my_async_test(){ $fp = fopen(wp_upload_dir()['basedir'] . '/log.txt', '...
0
votes
1answer
590 views

How to Schedule Cronjobs for start of every month and year

I have been trying to run a function at first of every month, and first of every year. And i wanted to run at 12am exact. Below I have shown the function. When is schedule it for daily it works ...
0
votes
0answers
23 views

wp-cron event doesn't run when custom login API is enabled

I have a cron job on my wordpress site. which I would like to run every hour. I also have a custom login function on my site: users are directed to my site via another site which passes login ...
0
votes
0answers
33 views

CRON job to update wp_usermeta value each day or week based on server time

My Wordpress site has a registration field that asks members how many weeks pregnant they are. If a member insert 5 then 7 days later that integer needs to increase to 6. Pseudo code for what I ...
0
votes
1answer
283 views

wp delete duplicate entries of custom post types every 15 minutes

looking for some assistance. I have searched the usual sites but not come across this specific question and was wondering if anybody could help. I have a scrape system that collects data and saves it ...
1
vote
1answer
143 views

Issues When Recursively Calling wp_schedule_single_event()

I run a site where I make an external API call. I want to have a failure case such that, if the API call fails, it will call wp_schedule_single_event() to re-try the API call in +4 hours. If that ...
1
vote
1answer
298 views

WP All Import manual Cron

I am having problem to set up Cron to import stock. In Plugin WP-All Import i have two urls. One which starts import, another one is checking process and if it's stuck it kicks it back on. I'm runing ...

1
2 3 4 5 6