public/wordpress/wp-content/plugins/backupbuddy/destinations/stash2/init.php
/* cron_kick_api()
	 *
	 * Instructs Stash API to kick our cron at this URL. Note: If $blocking === false then the HTTP request is non-blocking and we will get no response logged.
	 *
	 */
cron_kick_api()
Instructs Stash API to kick our cron at this URL. Note: If $blocking === false then the HTTP request is non-blocking and we will get no response logged.
cron_kick_api () Instructs Stash API to kick our cron at this URL . Note : If $blocking === false then the HTTP request is non - blocking and we will get no response logged .
public static function cron_kick_api( $settings, $blocking = true ) {
		$activity_time_file = backupbuddy_core::getLogDirectory() . 'live/cron_kick-' . pb_backupbuddy::$options['log_serial'] . '.txt';
		if ( file_exists( $activity_time_file ) ) {
			if ( false !== ( $mtime = @filemtime( $activity_time_file ) ) ) {
				$ago = ( time() - $mtime );
				if ( $ago < backupbuddy_constants::MINIMUM_CRON_KICK_INTERVAL ) { 
					pb_backupbuddy::status( 'details', 'cron-kick API call too soon (' . pb_backupbuddy::$format->time_ago( $mtime ) . ' ago). Skipping for now.' );
					return true;
				}
			}
		}
		@touch( $activity_time_file );
		$response = pb_backupbuddy_destination_stash2::stashAPI( $settings, 'cron-kick', array(), $blocking );
		if ( false === $blocking ) {
			return true;
		}
		if ( ! is_array( $response ) ) { 
			pb_backupbuddy::status( 'error', 'Error #3279723: Unexpected server response. Detailed response: `' . print_r( $response, true ) .'`.' );
		} else { 
			if ( isset( $response['error'] ) ) {
				pb_backupbuddy::status( 'error', $response['error']['message'] );
			} else { 				if ( ! isset( $response['success'] ) || ( '1' != $response['success'] ) ) {
					pb_backupbuddy::status( 'error', 'Error #3289327932: Something went wrong. Success was not reported. Detailed response: `' . print_r( $response, true ) .'`.' );
				} else {
					pb_backupbuddy::status ('details', 'Successfully inititated cron kicker with API.' );
					return true;
				}
			}
		}
		return false;
	}
public static function cron_kick_api ( $ settings , $ blocking = true ) { $ activity_time_file = backupbuddy_core :: getLogDirectory ( ) . 'live/cron_kick-' . pb_backupbuddy :: $ options [ 'log_serial' ] . '.txt' ; if ( file_exists ( $ activity_time_file ) ) { if ( false !== ( $ mtime = @ filemtime ( $ activity_time_file ) ) ) { $ ago = ( time ( ) - $ mtime ) ; if ( $ ago < backupbuddy_constants :: MINIMUM_CRON_KICK_INTERVAL ) { pb_backupbuddy :: status ( 'details' , 'cron-kick API call too soon (' . pb_backupbuddy :: $ format -> time_ago ( $ mtime ) . ' ago). Skipping for now.' ) ; return true ; } } } @ touch ( $ activity_time_file ) ; $ response = pb_backupbuddy_destination_stash2 :: stashAPI ( $ settings , 'cron-kick' , array ( ) , $ blocking ) ; if ( false === $ blocking ) { return true ; } if ( ! is_array ( $ response ) ) { pb_backupbuddy :: status ( 'error' , 'Error #3279723: Unexpected server response. Detailed response: `' . print_r ( $ response , true ) . '`.' ) ; } else { if ( isset ( $ response [ 'error' ] ) ) { pb_backupbuddy :: status ( 'error' , $ response [ 'error' ] [ 'message' ] ) ; } else { if ( ! isset ( $ response [ 'success' ] ) || ( '1' != $ response [ 'success' ] ) ) { pb_backupbuddy :: status ( 'error' , 'Error #3289327932: Something went wrong. Success was not reported. Detailed response: `' . print_r ( $ response , true ) . '`.' ) ; } else { pb_backupbuddy :: status ( 'details' , 'Successfully inititated cron kicker with API.' ) ; return true ; } } } return false ; }
cron_kick_api()
 Instructs Stash API to kick our cron at this URL.
cron_kick_api () Instructs Stash API to kick our cron at this URL .
// Trying to kick too soon. // Error message. // Errors. // No error?
