[wp-hackers] wp_cron - How does it know if it's running?

Scott Kingsley Clark scott at skcdev.com
Mon Feb 28 01:54:39 UTC 2011


I'm assuming wp_cron has some sort of built-in ability to determine if 
it should run a hook or not in the event that wp_cron is still running 
the cron.

So for example, you schedule a cron to be run every 30 minutes. If the 
task runs for longer than 30 minutes, does it know not to run the cron 
again, or does your function need to stop itself from being 'greedy'?

Also, if a specific cron is still running, how does wp_cron know whether 
it needs to run something or not if the job is still going? For example 
(using same 30 minute schedule), someone goes to your site and it kicks 
a sideload of the cron. About 4 minutes later someone else goes to your 
site, does wp_cron attempt to run your cron again since it hasn't finished?

Thanks for the help ahead of time gang, just want to make sure I'm 
making my plugin avoid overlapping jobs.


Best Regards,

Scott Kingsley Clark
Developer / Consultant
SKC Development, LLC

------------------------------------
E-mail: scott at skcdev.com
Website: http://skcdev.com/
Phone: 214.233.4048
Fax: 214.260.1426

AIM / Yahoo / Skype: sc0ttkclark
Google Talk / Windows Live: scott at skcdev.com
IRC: sc0ttkclark / irc.freenode.net
------------------------------------




More information about the wp-hackers mailing list