Changeset 479133
- Timestamp:
- 12/22/2011 10:48:56 AM (14 years ago)
- Location:
- wp-cron-control/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wp-cron-control.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-cron-control/trunk/readme.txt
r459746 r479133 3 3 Tags: wp-cron, cron, cron jobs, post missed schedule, scheduled posts 4 4 Donate link: http://hitchhackerguide.com 5 Tested up to: 3. 1.25 Tested up to: 3.3 6 6 Stable tag: trunk 7 7 … … 31 31 == ChangeLog == 32 32 33 = Version 0.5 = 34 35 * Adjustments for improved cron locking introduced in WordPress 3.3 http://core.trac.wordpress.org/changeset/18659 36 33 37 = Version 0.4 = 34 38 -
wp-cron-control/trunk/wp-cron-control.php
r459746 r479133 5 5 Description: get control over wp-cron execution. 6 6 Author: Thorsten Ott, Automattic 7 Version: 0. 47 Version: 0.5 8 8 Author URI: http://hitchhackerguide.com 9 9 */ … … 238 238 // make sure a secret string is provided in the ur 239 239 if ( isset( $_GET[$secret] ) ) { 240 240 241 // check if there is already a cron request running 241 242 $local_time = time(); 242 $flag = get_transient('doing_cron'); 243 if ( $flag > $local_time + 10*60 ) 243 if ( function_exists( '_get_cron_lock' ) ) 244 $flag = _get_cron_lock(); 245 else 246 $flag = get_transient('doing_cron'); 247 248 if ( defined( 'WP_CRON_LOCK_TIMEOUT' ) ) 249 $timeout = WP_CRON_LOCK_TIMEOUT; 250 else 251 $timeout = 60; 252 253 if ( $flag > $local_time + 10 * $timeout ) 244 254 $flag = 0; 245 255 246 256 // don't run if another process is currently running it or more than once every 60 sec. 247 if ( $flag + 60> $local_time )257 if ( $flag + $timeout > $local_time ) 248 258 die( 'another cron process running or previous not older than 60 secs' ); 249 259 250 260 // set a transient to allow locking down parallel requests 251 261 set_transient( 'doing_cron', $local_time ); 262 263 252 264 253 265 // if settings allow it validate if there are any scheduled posts without a cron event
Note: See TracChangeset
for help on using the changeset viewer.