[wp-trac] [WordPress Trac] #17888: Problems with build in Cronjob Schedule - is this a bug?
WordPress Trac
wp-trac at lists.automattic.com
Sat Jun 25 10:29:04 UTC 2011
#17888: Problems with build in Cronjob Schedule - is this a bug?
--------------------------+-----------------------------
Reporter: 1manfactory | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron | Version: 3.1.3
Severity: normal | Keywords:
--------------------------+-----------------------------
I have programmed a pluging (Emu2 - Email Users 2) to send out mails to
users/groups. It's still beta but the main functions work.
Now I added a feature for a digest of the newest posts to be sent out once
a day controlled by the build in scheduler.
I do the following:
{{{
# plan the scheduler
add_action('EMU2_task_hook', 'EMU2_send_scheduled');
}}}
where EMU2_send_scheduled is the function sending all the mails. This is
working.
{{{
wp_clear_scheduled_hook('EMU2_task_hook');
wp_schedule_event( strtotime( $schedule_time ) - get_option('gmt_offset')
* 3600 , 'daily', 'EMU2_task_hook' );
}}}
Where $schedule_time is set by the user, e.g. "23:15" for mails to be sent
at 11:15 pm.
This works, I checked it with wp-crontrol.
But now come the problems.
Some of the users which downloaded my plugin reported strange behaviors
with the scheduled mails send out every hour instead of only once a day.
Or with mails send three times in a row.
I first thought they did something wrong. But after a few days of stable
work it happened to me as well (Online, less than 10 users, Linux)
I am using/testing this on 5 installations, online and offline, on
different hosts and systems (Windows/xampp and Linux). Some work today,
but they fail the next day with sending two or even three mails at once,
i.e. starting the job two/three times.
I have no clue what is going on.
Is this a bug? Is this caused by interferences with other schedules or
plugins?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17888>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list