wp-cron refers to a WordPress subsystem that allows for the scheduled execution of code
0
votes
2answers
20 views
WP Cron doesn't save <iframe> or <object> in post body
I am using wp_cron to auto grab posts from a remote website and save them in my wp db.
NOTICE! I am executing my code from my plugin, not from my template functions.php or somewhere else. I have my ...
3
votes
1answer
40 views
Which action for triggering cron “wp”or “init”?
Which one do you recommend using within a plugin and why?
add_action( 'wp', 'trigger_me' );
function trigger_me() {
if ( !wp_next_scheduled( 'my_plugin_cron' ) ) {
...
3
votes
0answers
38 views
run a cron task without obstructing page load?
I have a plugin that lets users upload post attachments via AJAX in the admin area. I later try to push these files to DropBox via their REST API. It almost works. The issue is with WP cron task ...
0
votes
1answer
36 views
Better handling of WP-CRON server load abuse
There are multiple reports on how wp-cron is a far from ideal solution because it runs every time a page is loaded, which is unnecessary in most scenarios (one scenario in which it would be necessary ...
2
votes
1answer
22 views
Scheduling a task using class methods
I need to implement a scheduled task in my plugin, and I tried to follow the examples in the documentation, passing one of class methods as the target. I installed Cron Manager plugin, and I see that ...
2
votes
0answers
46 views
WP Cron emails not working
Running wp 3.5.1.
I have 2 plugins that work in part. They do everything nice. If I click to send emails, they send the emails. However the scheduled emails are not being sent.
The plugins are:
...
2
votes
1answer
25 views
Is there a quick way to view the wp-cron schedule
I'm trying to work which plugin is triggering wp-cron. I know about the code: http://codex.wordpress.org/Function_Reference/wp_get_schedules , but I'd prefer to do something in the sql backend rather ...
1
vote
0answers
26 views
Wordpress daily cron is executing more frequently than once a day
I have a wp cron job scheduled based on what's in the options. In this case its schedule daily.
add_action('init', function(){
if( !wp_next_scheduled('product_posting_cron') ){
...
0
votes
1answer
26 views
Are uploads directories created on a schedule?
I have a cron job that alerts me to modified files on a couple of WordPress installs. Two of them alerted me tonight to the creation of apparently empty folders like
...
0
votes
0answers
16 views
Scheduling daily refresh of posts
So here's my situation: I'm using AmazonSimpleAdmin to display products using the Amazon API. I have one product per post. The API limits 1 request per second. Meaning my front page can only have one ...
0
votes
1answer
45 views
wp-cron: freeze at “now”
sorry for the silly question. Briefly I have a wp (v. 3.5.1) blog using a heavily modified (by myself) theme. Everything works fine except for wp-cron. Listed jobs appears in (for instance) crontrol ...
0
votes
1answer
42 views
How to make wp cron job not fire immediately?
I'm scheduling a job in wp cron:
add_action('my_cron_hook', 'my_cron_action');
wp_schedule_event( time(), 'interval1', 'my_cron_hook' );
function my_cron_action(){
//do something
}
The ...
0
votes
0answers
29 views
Missed Schedule alert on dashboard?
Is there a way to pull a list of posts that have missed their schedule and display them on the dashboard?
I'm having an issue with missed schedule posts sometimes and don't want to use the plugin ...
0
votes
0answers
27 views
wp_schedule_event attempt causes T_CONSTANT_ENCAPSED_STRING error
I'm developing a plugin and am trying to set up a recurring event for it. However, even putting the function that I'm about to link to an activation hook in my file causes wordpress to throw this ...
0
votes
0answers
93 views
“Wordpress Firewall 2” Causes 403 Forbidden Error in wp-cron.php Thwarting “BackUpWordPress”
My web sites have been hacked in the past, so I set up certain security features on each site like a firewall plugin, for instance. In fact, the week after I forgot to re-enable the firewall when ...
1
vote
1answer
115 views
Converting timestamps to local time with date_l18n()
I've got a WordPress cron job that sends an email periodically and saves the timestamp when it was sent as an option, and I'd like to display a date on a settings page. Something like, "The last ...
7
votes
4answers
241 views
WP Cron doesn't execute when time elapses
The goal
I want to use wp_schedule_single_event( ) to execute a single event that sends me an e-mail 8 minutes after the user submits a form.
The issue
The following code is in my functions.php:
...
0
votes
0answers
23 views
wp_schedule_single_event works on local but not on live
I'm using the wp_schedule_single_event() function to email an author designated "Important Post" to all users of a site one second after saving the post (so that it runs in the background and the ...
2
votes
0answers
90 views
Change post status based on meta value
I have this cron set up to trash posts x days after it is posted. This works. Edit: Added my answer to my question.
add_action( 'wp', 'do_trash_ads' );
function do_trash_ads()
{
if ( ! ...
0
votes
1answer
30 views
Problem trying to create a cron job in wordpress [closed]
I am trying to create cron events in wp, to if the cron jobs have been created I am using this plugin: WP-Cron Dashboard.
To create the cron job in a plugin i do this:
...
$action_tag_name ...
1
vote
1answer
78 views
How do i schedule cron in wordpress for each second?
I want to schedule a cron job in Wp3.5.1 to sending email to those customer whose appointment is pending.
here some code am trying:
For the testing am scheduling corn for each second to insert row ...
0
votes
1answer
181 views
Wordpress schedule posting not working, if i added define('DISABLE_WP_CRON', false); how do i fix it?
I have Wordpress 3.5.1 and I use Bluehost hosting service. When I schedule posts after that time passed, WP posts dashboard shows "Missed schedule" message under the date. Then I checked my ...
0
votes
1answer
68 views
Managing scheduled tasks
I want users of my plugin to be able to define whether a task operates daily, twice daily, hourly or not at all as per the standard WP set-up. I'm storing these as 'daily', 'twicedaily', 'hourly' or ...
1
vote
1answer
53 views
wp_next_scheduled returning a past timestamp
So, here is my entire code in wp_content/plugins/my_plugin/my_plugin.php :
register_activation_hook(__FILE__, 'comunity_mails_activation');
add_action('check_mails_to_send', 'do_this_daily');
...
2
votes
0answers
80 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 ...
4
votes
1answer
187 views
When does next Cron Job run (time from now)?
I would need to know how much time is left between now and the next time a specifc Cron Job is done.
For another answer I built a basic cron inspector plugin which can be found here.
Reason I'm ...
3
votes
1answer
98 views
Trigger a cron every 24h GMT -8
I' like to run a cron every 24 hours at midnight PST ( = GMT -8 )
This is what I have
if ( !wp_next_scheduled( 'cron_hook' ) ) {
//reset on 00:00 PST ( GMT -8 ) == GMT +16
$timeoffset = ...
1
vote
1answer
119 views
How to fix missing function in wp-cron?
One of my sites consistently fails to publish scheduled posts. I've tried disabling plugins, using Twenty Twelve, etc. with no luck.
I installed the Core Control plugin and noticed that there is no ...
0
votes
1answer
71 views
Create wp_cront events dynamically upon user submission
Is it possible to set up new wp_cron jobs dynamically upon a certain action?
I have a form submission (I'm using Gravity Forms, so have several functions set up on several of their hooks already) ...
1
vote
1answer
44 views
How is WP Cron Locking implemented?
WordPress takes measures to ensure that a cron task doesn't run twice when it should run once, e.g. once every hour when an hourly schedule is given, rather than the occasional twice at the scheduled ...
1
vote
1answer
94 views
Getting Error “invalid secret string” by running wp-cron.php manually
I am trying to run the wp-cron.php manually by calling it that way:
http://mysite.com/wp-cron.php?doing_wp_cron
Disabling the auto cron function with :
define('DISABLE_WP_CRON', TRUE);
produces ...
1
vote
0answers
60 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 ...
2
votes
1answer
72 views
Long running action from plugin
I'm creating a WordPress plugin that will copy posts data to a remote database, I know it will take a while to transfer all the posts.
How should I create copy functionality so it won't timeout? ...
1
vote
1answer
101 views
How to code schedule / cron job
I am using wp_schedule_event to hourly insert items from an rss news feed into my client's blog. Here is how I am setting it up in my functions.php:
add_action('init', function(){
$timescheduled ...
1
vote
0answers
125 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
votes
1answer
161 views
get_posts inside cron
Edited to rewrite my question
I'll try to be as clear as possible, as I need to get this resolved quickly.
I disabled WordPress' cron, and added a real cron job on my server to call wp-cron.php ...
1
vote
0answers
14 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') && ...
2
votes
2answers
193 views
Run WP Cron Weekly (but on a certain day)
I'm looking add-in a bit more speficity to the WP Cron intervals. To add a "weekly" interval, I've done the following:
function re_not_add_weekly( $schedules ) {
$schedules['weekly'] = array(
...
1
vote
1answer
187 views
Do wp-cron scheduled tasks run asynchronously?
I have a task scheduled to run daily using wp-cron. The task takes over a minute to run (between downloading and parsing a very large file with cURL). According to the WP documentation,
"The ...
1
vote
1answer
198 views
How to make sure a wp-cron job runs
I am using a plugin to send emails to a relatively large email list. Because we have a low per-hour email threshold from our host we have to use a setting in the plugin to throttle the emails down to ...
5
votes
2answers
355 views
How to use wp_schedule_event in a class?
This is first time I try OOP method to write application, not quite understand yet. Currently I have a cron like this:
if( !wp_next_scheduled( 'my_cron_hook' ) ) {
//schedule the event to run daily
...
1
vote
1answer
117 views
How to set up WP Cron in this scenario
I wanted to use Wordpress built in WP Cron to update currency rates daily.
I use this function currently,
require_once(WP_PLUGIN_DIR . '/autocurupdate/currencyexchange_class.php');
$cx=new ...
1
vote
0answers
40 views
Cron job not run on activation
The code i am pasting is supposed to run the function exporting once on activation of plugin and then hourly. But it doesn't run on activation nor hourly. I do see it in the list of cron jobs that are ...
0
votes
2answers
334 views
Cron Job not working in plugin
I have written a plugin that will convert posts to excel format and then email the .xls to an email id. I can make it work with when function is declared in functions.php but does not work with ...
2
votes
1answer
97 views
How to remove unused avatar uploads in buddypress
Im seeing in my wp-content/uploads/avatars folder that there are tons of avatars from when I created test users, but changed the avatars. So, i’m assuming that even if the user changes their avatar, ...
9
votes
1answer
1k views
PHP Warning on fresh install (Connection timed out)
I get this PHP Warning when accessing my fresh WordPress 3.4.1 install (Norwegian language).
Warning: fopen(URL_TO_MY_WORDPRESS_PAGE/wp-cron.php?doing_wp_cron=1341476616.7605190277099609375000): ...
3
votes
1answer
216 views
Recurring scheduled task help
I'm trying to set up a scheduled task in my Wordpress installation which will (eventually) run a script to send an email once a day with a load of data in.
However I can't seem to get a scheduled ...
2
votes
1answer
170 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 ...
0
votes
4answers
690 views
add_action to wp cron?
I'd like to execute some code everytime my wordpress cron runs, regardless of the timeframe. Is it possible to create an add_action for this? I looked in the filter list but I couldn't find anything ...
0
votes
1answer
101 views
How do you make a custom post type items automatically delete items 3 months after publication?
I'd like somer code that I can place in my functions.php file that will only modify the specified custom post type.
I have already tried several plugins, but all of them have more features than I ...
