The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
2answers
150 views

Run function with linux cron job in Wordpress

I know that WordPress has a faux cron that is called like so when a user visits the page. register_activation_hook(__FILE__, 'my_activation'); add_action('my_hourly_event', 'do_this_hourly'); ...
0
votes
2answers
41 views

Pages for Cron use Only?

so I've got a bunch of custom page templates that are scripts that are meant to be run by cron to update various things on my wordpress site, there are not meant to be viewed by regular site users. ...
-1
votes
2answers
72 views

wordpress.org disallowing my plugin becuase of loading core files in cron cpanel file

I made a plugin and trying to install on wordpress.org but Wordpress is giving me error message that ## Calling core loading files directly is incorrect. I am using a cron file in my plugin.This cron ...
5
votes
1answer
112 views

Wordpress cron isn't scheduled on amazon web services

I'm trying to setup a cron to run every hour, it works fine on my local vagrant box, but it doesn't seem to schedule properly on aws(elastic beanstalk). Here's the code: register_activation_hook(...
3
votes
1answer
196 views

Multiple wp_schedule_event cron jobs in plugin cause multi-execution

over the last week I have been working on some cron jobs for a real-estate website that has hundreds of updates/deletes and new posts added each day. I am very near the end now and looking to ...
2
votes
1answer
249 views

Scheduled Posts and wp-cron - Why don't scheduled posts publish if too old?

I notice that the documentation for wp_schedule_single_event mentions the following:- The action will fire off when someone visits your WordPress site, if the schedule time has passed. However ...
0
votes
1answer
26 views

Remove Featured Images from Posts Older Than a Certain Date

I run a network of sites, with hundreds of editors, and lately we've had image copyright trolls coming after us. Most of these images are a year old or older, so we're looking to remove all images ...
0
votes
1answer
49 views

WordPress: Cron locking and Queue

I have some CPU intensive scripts that I don't want to run concurrently. Every now and again the scripts will overlap and crash the server. Already at 2GB and the mysql container still crashes. I ...
0
votes
1answer
179 views

cron job to auto delete posts of a specific post type older than x days

I want to delete all posts of a specific post type (in this case "vfb_entry") that are older than 60 days. The cron job should run once a day. I have the following code but it's not working if I ...
0
votes
1answer
101 views

WP Cron as Fast as WordPress AJAX?

I have a question about performing a very long and resource intensive task within WordPress. Here is the scenario. I have a plugin that allows users to run a task that takes a very long time and ...
0
votes
1answer
162 views

Huge cron option_value into wp_options table

I recently noticed after performance errors and failure that the memory that a single request was consuming (either front or back) was increased rapidly. After hours of experiments and research I ...
0
votes
1answer
79 views

Best place to keep files that are called by cron jobs?

I am interesting in setting up a Wordpress Website which needs to keep updating certain custom database tables after fetching data from RESTful Web Services, lets say once in a day. I can achieve ...
0
votes
1answer
93 views

does wordpress auto update work without a cron job?

I'm a bit on a loss here. Since WP 3.7 you can update your wordpress automatically. Since then it's more hit and miss on several servers here. I would like to understand, if it is enough to enable ...
0
votes
1answer
236 views

What is the use of wp_schedule_event hook?

I want to do a cron(executes function at specific time, like email,db backup etc) job. I searched in wordpress, i got this wp_schedule_event Here they say it will execute job when someone visits ...
0
votes
1answer
235 views

Cron job to call php to email last 24 hours posts

We have been trying to call via CronJob a PHP script that will email the past 24 hours posts using the 'post_type' = 'reservations' filter. <?php query_posts( array( 'post_type' => '...
0
votes
1answer
143 views

setting featured image is not working while running script in background, works when running that script from browser

I have creted a script which will fetch content from one of my site and automatically create new post in my wordpress blog. When I am running that script from browser, its working really cool! post ...
3
votes
0answers
122 views

Get frequency of scheduled event

How do I get the frequency of a scheduled event? I am writing a plugin, that would do something in a user defined schedule. The way I am trying to do this, is creating a custom cron schedule, which ...
2
votes
0answers
14 views

crontab wp-cron.php on multisite path-based network: one for each path? Or just one for the root?

I have a single wordpress with multisite config enabled: define( 'WP_ALLOW_MULTISITE', true ); I want disable internal cron in wp-config.php with: define('DISABLE_WP_CRON', true); My multisite ...
1
vote
0answers
34 views

Cron job not working - Can't see in the queue attached

I have a custom schedule defined for a cron job to be triggered. This is how my code looks: <?php //wp-config define('DISABLE_WP_CRON', true); //Plugin file register_activation_hook( '__FILE__', '...
1
vote
0answers
24 views

Can you register two cron events in a single function?

Take the following: public static function activate() { wp_schedule_event( time(), 'twicedaily', 'process_rss_items' ); wp_schedule_event( time(), 'minute_15', 'process_top_news' ); } // end ...
1
vote
0answers
88 views

“Error establishing database connection” when trying to run script through crontab

I'm trying to run a function every 60 minutes using crontab in an elasticbeanstalk environment in AWS, this is my cron: */2 * * * * cd /var/www/html; /usr/bin/php /var/www/html/import_jobs_cron.php ...
1
vote
0answers
70 views

wp cron job fires at every second or so, if callback is wrapped with DOING_CRON check it never fires at all

I am a bit lost while dealing with a open source plugin implementing wp cron. You can read about the problem on github https://github.com/nekojira/wp-currencies/issues/6#issuecomment-116735909 - I ...
1
vote
0answers
56 views

Set post to unpublished after one week depending on condition

I have a post type with a custom field checkbox. If this checkbox is checked and the post is published, I want to unpublish when one week has passed since last modified date. How would I go about ...
1
vote
0answers
58 views

Store partial database to an archive database time to time

As the community knows me that I'm not a PHP Developer by core, but trying to be one. With the company I'm working, I developed many WordPress powered News Portals, where- They publish at least 30 - ...
1
vote
0answers
411 views

wp_schedule_single_event function not working

I am testing the wp_schedule_single_event function and it is currently not working on my upgraded version of wordpress. It looks like the event is being scheduled but the code in my hook is never ...
1
vote
0answers
248 views

Is it possible to use `wp_schedule_event` with real cronjobs?

I hate the way Wordpress Cron Jobs run, so I disabled them: define('DISABLE_WP_CRON', true); and want to run a real cron job instead: wget http://www.myserver.com/wp-cron.php > /dev/null 2>&...
1
vote
0answers
59 views

Problems with cron

I have a this code that delete some post meta at al 7:55 hour of the server: if ( !wp_next_scheduled('borra_meta_datos') ) { wp_schedule_event( mktime(7, 55, 0, date('n'), date('j')), 'daily', '...
1
vote
0answers
32 views

How ( and mostly at what time ) can i prevent the alternate cron from running?

I'm using the alternate cron version, but i need to prevent it from running on some calls, how can i do this? In the cron.php file i've seen on line 225 if ( defined('ALTERNATE_WP_CRON') && ...
0
votes
0answers
12 views

Automate Search Replace wp_posts content

I am currently replacing wp_posts content using the below sql query update wp_posts set post_content = replace(post_content,'old text','new text'); I use phpmyadmin currently. However I would want ...
0
votes
0answers
28 views

Set up a wp_cron to work daily, and set up a real cpanel chron, but its not working

So I followed all the instructions on this page https://support.hostgator.com/articles/specialized-help/technical/wordpress/how-to-replace-wordpress-cron-with-a-real-cron-job disabled wp_cron, and ...
0
votes
0answers
32 views

WordPress Scheduled Task Not Firing

I want to echo a string after a time period using WordPress scheduling. Below is my code in functions.php. Nothing gets printed through echo statement and also there is no error. Please guide what am ...
0
votes
0answers
18 views

How to have a cron execute at a certain time on a certain day of the week

What's the best way to set a WP cron to fire once every Friday at 7PM EST? I know I could do something like the following, but if I understand correctly it will fire once right away, then reschedule a ...
0
votes
0answers
37 views

Cron and WP Super Cache in Preload Mode

I disabled WordPress Cron and configured a real Cron (Linux Cron) to hit wp-cron.php every 8 hours, but I'm not sure how it affects the behavior of WP Super Cache in Preload Mode. As far as I know, ...
0
votes
0answers
20 views

wp_schedule_event get value from database Not Working

I'm develop plugin auto post, but my event schedule not working. the function only work when browser open. i get data from database. i want have dynamic dropdown add_filter( 'cron_schedules', '...
0
votes
0answers
28 views

How to setup a mail list with 2 hour autoresponder?

I have a WordPress blog and I want to put my product behind a subscribe list sign up. Here are my requirements: Need subscribe list to work with WordPress or Dreamhost (my hosting company is ...
0
votes
0answers
99 views

What is the cron doing?

So I installed the P3 plugin to analyze the plugin load time at my site. It was OK at the actually analyzing but just a really poor plugin that basically crashed my server which has great specs over ...
0
votes
0answers
182 views

Email Inactive User on WordPress

I have seen this question all over but never seen an answer... I am using Paid Membership Pro and want to be able to have an automatic email go out if a user has not logged in for X number of days ...
0
votes
0answers
84 views

Wordpress Multisite Cron Issue

I'm having some very weird cron issues. I was looking to run cron on a multisite subfolder install. And I user Debug Bar Cron plugin to see my cron jobs. I can see that the cron jobs are running fine ...
0
votes
0answers
207 views

Cron Job to Delete over 30 days old post from post type

This is my first time creating a WP cron job and I would like to have someone else review it for mistakes. I wrote this cron job to delete temporary wishlists that are over 30 days old. The wishlists ...
0
votes
0answers
30 views

XML Imported Custom Posts

I have an xml feed populating a custom post type. I need the custom post type to add the first imported image as the featured image. I have come across the following function and adapted it: ...
0
votes
0answers
64 views

Scheduled event occurring each page load, but supposed to happen daily

I have a scheduled event that is supposed to occur only once a day at 12am. However, for some reason my scheduled event is happening on each page load and I can't figure out why. The default ...
0
votes
0answers
202 views

Wordpress can't seem to handle tens of thousands of scheduled posts? Cron Breaks

I have a website listing doctors in the us. I'm spreading out the posts over 2 years, but I have about 2.8 million doctors to list. Right now I'm adding the post automatically via a custom script, and ...
0
votes
0answers
30 views

Cache plugin Cache all Pages by cron

Does someone know if there is a cache plugin where you can choose if you can cache all pages at once? And if possible with a cron!
0
votes
0answers
437 views

Using mysql queries to delete custom post types based on meta_value

I am trying to create a cron job to run on my server which deletes a custom post_type (post_type = event) from my databse based on a meta_key (st_date) and a meta_value (the date the event took place ...