Questions tagged [cron]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
2k views

How Do I Make WordPress Run an Event Every Day?

In a plugin I want to build, it deals with contests. A contest has a date on it. Does WordPress have a feature in it where it can run a piece of code every day without requiring someone to create a ...
Volomike's user avatar
  • 1,805
1 vote
1 answer
176 views

Which file do I run a cron job on to make Twitter News Feed update more often?

I have installed the Twitter News Feed plugin which only updates once an hour. There is a button to press though that updates it immediately. I presume therefore that there is a file that I can call ...
Artblogger's user avatar
3 votes
1 answer
328 views

Hourly WP schedule, do I need at least 1 visitor hourly?

I am planning to schedule an hourly task from my wp plugin, as I understand these tasks are triggered by visits to the website. So for an hourly task I will need at least one visitor hourly. Does it ...
kyxrus's user avatar
  • 69
0 votes
1 answer
968 views

How does one programmatically manage posts from a external php script?

How does one create a post, assign it to a category, add tags to it and set the featured image from a PHP script that exists somewhere on disk (say /usr/local/process.php) and isn't part of the ...
bloudraak's user avatar
  • 103
1 vote
1 answer
118 views

Remind a user about their account if they have not used it for 6 months

I have a website working with a user registration/login system all working also. I wish to automatically send all users an email that have not used their account for 6 months. I have an idea, but ...
JamesG's user avatar
  • 239
0 votes
1 answer
4k views

How to Automatically import external images to Upload

Hi to all I would like to have a simple plugin, hook, anything that Automatically caches external images. Simple explanation: Actually I'm using this plugin: http://wordpress.org/extend/plugins/cache-...
maisdesign's user avatar
1 vote
2 answers
1k views

WordPress Caching - Transients API or "update_user_meta " Cronjob?

I'm trying to set user meta based on queries. Basically, things like IF the query returns true, set this or if not, set this (or don't set it, if it is true). This works great but the problem is I ...
Zach Reed's user avatar
  • 173
3 votes
1 answer
1k views

Cronjob not working as expected - issue with hook?

Today I've tried to write a Wordpress Cronjob. For testing purposes I wrote a function that sends me an email every hour, but it's not working. I've got a plugin called 'Core Control' which shows me ...
Sven's user avatar
  • 371
2 votes
1 answer
2k views

Schedule event every second thursday of the month

I'm working on an email system and they want it automated to send out emails every second thursday of the month. I've got the PHP sorted out and ready to fire a callback to send the emails, but I'm a ...
Josh Allen's user avatar
9 votes
2 answers
7k views

Delete all scheduled events with a particular hook

I have several cron jobs all hooked to the same hook, but each with a different argument (a post ID). It appears wp_clear_scheduled_hook only clears job which match the argument passed with it (or ...
Stephen Harris's user avatar
8 votes
2 answers
2k views

Running WordPress on the Command Line - Turn off Delayed Output?

I'm creating a cron job that runs outside of WordPress. From a development perspective, this makes it really easy to debug and create cleanup scripts or cron jobs, by just running a command like the ...
Alex Cook's user avatar
  • 567
0 votes
2 answers
5k views

wp_schedule_event / cron_schedules - custom recurrence time not working in Plugin

I am trying to add custom intervals for the WP cron in a plugin. It run with "hourly", "daily" default recurrence time. It dont' run when I add my own custom recurrence time for the function ...
LeMoussel's user avatar
  • 111
0 votes
1 answer
2k views

A unique wp_schedule_single_event() for each post?

I'm building a site for a client that requires sending out emails about each post at various dates (i.e. two weeks before after the post was published, then again four weeks after the post was ...
Nick Budden's user avatar
1 vote
1 answer
6k views

Run W3 Total Cache Flush Function with Crontab [closed]

Ok. I'm really stumped on this one. Basically, I need to call a function for the Wordpress plugin W3 Total Cache as part of a cron job in crontab. I'd like to automatically clear the entire page ...
dfcode3's user avatar
  • 701
1 vote
3 answers
1k views

Transients vs CRON +Custom Fields: Caching Data Per Post

Wanted some opinions on a solution I'm trying to come up with: I have a fan/enthusiast plugin I'm working on for fans of TV shows. One of the custom post types attached to the plugin is a release ...
Manny Fleurmond's user avatar
1 vote
1 answer
1k views

wp_schedule_event only when admin is visited

On the documentation page it says "The action will trigger when someone visits your WordPress site, if the scheduled time has passed." Is it possible to make this action trigger only when the admin ...
Mike's user avatar
  • 813
2 votes
1 answer
360 views

How do you load WordPress from an external script when using MultiSite? [duplicate]

Possible Duplicate: Using WordPress functions on other sites I have an external script that needs to load up WordPress in order to have access to WordPress functionality. In the past I have ...
user4356's user avatar
0 votes
1 answer
92 views

Generate Email if No Posts Within Time Period

I want an email to be sent to a specific list of email addresses if/when there have been no posts on the blog within the past 1 week. Any ideas on how I could do this?
GavinR's user avatar
  • 3,090
1 vote
2 answers
1k views

WP_cron won't trigger my action

I'm in a dead end with a schedualed task in a wordpress plugin for a multisite. Somehow the action I added don't get triggered. The task is getting schedualed and returns a timestamp when I run ...
user47608's user avatar
1 vote
2 answers
616 views

WP Cron is "half-failing" to insert posts

I built a plugin for my company, which basically goes to tube sites, scrapes them for content, and posts them automatically in whatever state is defined (publish, draft, future, etc). Now, everything ...
Itai Sagi's user avatar
  • 123
3 votes
2 answers
5k views

Initialize WordPress environment to use in a real cron script

I have to run a PHP script through real cron (WP cron being too unreliable). Within that script, I need $wpdb to insert data into WordPress table. But of course $wpdb will not be available as ...
a_fan's user avatar
  • 945
2 votes
1 answer
362 views

Scheduled event does not run at midnight

I have an event scheduled to fetch feeds from different sources at midnight. I believe for some reason it is not being triggered. I use Core Control plugin for testing. When I 'Run Now' through it, ...
a_fan's user avatar
  • 945
3 votes
2 answers
1k views

Cron jobs for deactivated plugins

Hi I am using a plugin to view the cron jobs that are run by wordpress. I am noticing that there are jobs related to plugins I have deactivated and even deleted. Why is this so and how can I remove ...
urok93's user avatar
  • 3,914
4 votes
1 answer
499 views

Calling static method in the Widget Class

I have a widget class Xwidget extends WP_Widget{ function cron_addB(){} } I want to run a cron job that calls that function from outside the class function xxx_cron_activation() { ; if ( !...
Freeman's user avatar
  • 143
1 vote
1 answer
137 views

Certain actions failing when run through cron

I am having a huge argument with Wordpress, and this is my last port of call before I throw the PC out of the window. I have a plugin here that exports an XML feed into Wordpress posts. The posts ...
Danny's user avatar
  • 21
1 vote
1 answer
6k views

WP CRON on shared hosting that does not allow loopback connections?

My hosting company infrom me that they do not allow loopback connections, which are required to run the following cron task on my server. I need to run a cron task for this plugin: http://tribulant....
Bill's user avatar
  • 15
0 votes
1 answer
157 views

I'm looking for a plugin to execute a specific task a certain time

I'm looking for a plugin capable of execute a task (in my case, switch the sticky attibutte of certains) in a specific hour (for example 22:00 hrs), Anyone knows a plugin with those capabilities? ...
Nisanio's user avatar
  • 153
1 vote
5 answers
2k views

Insert Wordpress page via external (cron) script?

I'm trying to write a php script that I can run out of cron to create new Wordpress pages. Unfortunately, I can't find any documentation on how to do this. I'm using the WP scripts rather than ...
user avatar
2 votes
1 answer
118 views

Will Wordpress use the newer schedule if it is updated using the filter 'cron_schedules'?

I learned that you can add new cron schedules by using the cron_schedules filter. If I change a interval of a schedule that I added earlier, will a job that uses this schedule be scheduled using this ...
Can't Tell's user avatar
0 votes
3 answers
3k views

What causes wp_schedule_single_event to fire off?

This isn't as simple of a question as you may think. Basically I have a C# program that is hitting the worpdress site and the wp_schedule doesn't seem to fire off. If I go to the site with my firefox ...
Thirlan's user avatar
  • 311
1 vote
2 answers
1k views

Auto Publish On Cron

I have some 100 unpublished posts. I want to publish 1 random post every time a cron is run. Is there a way or plugin to achieve this...
user avatar
1 vote
1 answer
241 views

WordPress Cron how to find out my event recurrence?

In my plugin I'm able to set a cron event like so: wp_schedule_event(time(), 'daily', 'myhookname'); But want I want to do is be able to find out what recurrence I have set for myhookname. The ...
Scott's user avatar
  • 12.1k
29 votes
2 answers
22k views

How to test wp_cron?

This is kind of a stupid question... I scheduled a action to run every hour: if(!wp_next_scheduled('my_hourly_events')) wp_schedule_event(time(), 'hourly', 'my_hourly_events'); add_action('...
onetrickpony's user avatar
  • 13.6k
2 votes
2 answers
2k views

Use Cron to modify posts via sql

Hi to all I need to run this twice a day: UPDATE wp_posts SET post_content = REPLACE ( post_content, '[img]', '<img src="' ); UPDATE wp_posts SET post_content = REPLACE ( post_content, '[IMG]', '&...
Downloadtaky's user avatar
1 vote
1 answer
402 views

Any insights into Transient API locking, cron and threading?

How does one go about locking down transient API requests for multiple threading? Has anything done some benchmarking, just how much can the transient API handle for multiple concurrent requests? It ...
Wyck's user avatar
  • 17.8k
1 vote
1 answer
7k views

Create cron job without a plugin?

Basically I wrote a function that lets me change the post status to draft depending of a field in the postmeta table: /** * Remove ads if they have been sold for over 5 days */ function ...
Javier Villanueva's user avatar
28 votes
4 answers
48k views

How to debug WordPress "Cron" wp_schedule_event

How can I debug problems with WordPress Cron? I think it will trigger when users go to your site but any errors wont be shown to them, as the jobs are run "asynchronously". So how might I debug errors?...
Jiew Meng's user avatar
  • 1,871
1 vote
1 answer
2k views

how to set array of args for scheduled event?

I have a scheduled event that runs twice daily in my plugin, the action is registered with add_action('fhprw_action','fhprw_check_fetch'); function fhprw_check_fetch($args){ $type=$args['type']; ...
CommentLuv's user avatar
0 votes
1 answer
2k views

How to set intervals in cron jobs?

I am having a unmanaged VPS, where my wordpress site is hosted, I am also using WP-ROBOT 3 plugin for auto posting, I want it to do auto post through cron jobs, According to the documentation of the ...
Niraj Chauhan's user avatar
2 votes
1 answer
1k views

PHP5, Inheritance, Singleton - action & filter hook limitations

I'm currently working on a plugin, which uses the builtin cron functionality of wordpress. Instead of using PHP4, I want to use PHP5 with inheritance and the singleton design pattern. I run in some ...
Roman's user avatar
  • 4,425
4 votes
3 answers
754 views

Refresh external feeds only in cron?

Is there an easy way to ensure that external feeds (via fetch_feed()) are only fetched via cron, and not when a regular user visits the site? This is for performance reasons, I want to minimize the ...
Jan Fabry's user avatar
  • 30.3k
5 votes
2 answers
6k views

wp-cron.php - How are WP's Cron transients removed?

I have a Wordpress Network that I am tasked with disabling the WP Cron and replacing it with an Apache Cron. I have set up a PHP script that when called by an Apache Cron will loop through all sites ...
Jonnybojangles's user avatar
0 votes
1 answer
284 views

pingbacks testing

I have a few questions regarding functionality testing of PBs in a new wp installation (3.0.4): Are pingbacks sent immediately when a post is published, or are they scheduled as a cron job? If the ...
user1567's user avatar
  • 487
0 votes
2 answers
736 views

Mail through Cron Execution does not work!

I have been trying to execute the PHP mail() function and wp_mail() function in a PHP function in WordPress. The PHP function is called by a cron hook. The problem is, it doesn't execute the mail() ...
user avatar
3 votes
2 answers
4k views

Transient RSS feeds in wp_options not removed automatically?

I just noticed 55.000 entries(!) in my wp_options table. I had not been there for a while. So I ran: delete from `wp_options` where `option_name` like '_transient_timeout_rss%' delete from `...
edelwater's user avatar
  • 2,574
2 votes
1 answer
574 views

Schedule cron event from widget

Can I use wp_schedule_event() to set up a cron job from within a widget? I tried, but I can't make it work, The problem seems to be the $hook parameter. The function I'm trying to hook is located ...
Alex's user avatar
  • 1,081
8 votes
1 answer
1k views

Real automated and unattended wordpress upgrade including plugins

I'm looking for a truly automated way to upgrade wordpress and its plugins, something that i could put in the crontab and configure it to run daily. I have several wordpress plugins (>20) and a multi-...
sorin's user avatar
  • 1,113
7 votes
3 answers
4k views

How do I log plugin (cron) actions?

Is there a recommended way to log (failed) cron actions from your plugin? For example, I have a plugin that synchronizes with an external service every hour. I want to log how much was changed, but ...
Jan Fabry's user avatar
  • 30.3k
1 vote
3 answers
370 views

Plugin for automated upgrade of WordPress core and it's plugins?

Is it possible to get your WordPress site to upgrade itself automatically? What I mean is, when plugins etc. needs to be upgraded, can you just press a button, or have a cron job, download the new ...
user avatar

1 2 3 4 5
6