Property | Type | Description | |
---|---|---|---|
$_eventObject | string | In an observer method you can use $observer->getData('schedule') or $observer->getData('data_object') to get this object | |
$_eventPrefix | string | Event name prefix for events that are dispatched by this class | |
$_redirect | boolean | Placeholder to keep track of active redirect buffer. | |
$_redirectOutputHandlerChunkSize | Prior to PHP 5.4.0, the value 1 set the chunk size to 4096 bytes. | ||
$errorSettingsBackup | array | Backup of the original error settings | |
$job | Aoe_Scheduler_Model_Job | ||
$jobWasLocked | boolean |
Method | Description | |
---|---|---|
_addBufferToMessages ( $buffer ) : string | Used as callback function to redirect the output buffer directly into the messages field of this schedule. | |
addMessages ( $messages ) | Append data to the current messages field. | |
canRun ( boolean $throwException = false ) : boolean | Check if this schedule can be run | |
checkPid ( ) : boolean | Check if process is running (linux only) | |
checkRunningAsCorrectUser ( ) : boolean | Check if the user running the process matches the configured user. Message will capture cases where the user is not set too in its response message. Process may optionally be killed, or may be allowed to continue. | |
getAllStatuses ( ) | ||
getDuration ( ) : boolean | integer | Get job duration. | |
getErrorLogFile ( ) : string | Get error log filename | |
getJob ( ) : Aoe_Scheduler_Model_Job | Get job configuration | |
getJobWasLocked ( ) : boolean | Flag that shows that a previous execution was prevented because the job was locked | |
getParameters ( ) : mixed | Get parameters (and fallback to job) | |
getStarttime ( ) : string | Get start time (planned or actual) | |
getStatuses ( ) : array | Gets statuses that are currently in the scheduler table | |
initializeFromJob ( Aoe_Scheduler_Model_Job $job ) | Initialize from job | |
isAlive ( ) : boolean | null | Is this process still alive? | |
isAlwaysTask ( ) : boolean | Check if this is an "always" task | |
kill ( ) : void | Kill this process | |
markAsDisappeared ( string $message = null ) : void | Mark task as disappeared | |
process ( ) | Process schedule | |
refresh ( ) | Get fresh version of this object | |
requestKill ( integer $time = null, string $message = null ) | Request kill | |
runNow ( boolean $tryLockJob = true, boolean $forceRun = false ) : Aoe_Scheduler_Model_Schedule | Run this task now | |
saveMessages ( ) | Save the messages directly to the schedule record. | |
schedule ( integer $time = null ) : Aoe_Scheduler_Model_Schedule | Schedule this task to be executed at a given time | |
scheduleNow ( ) : Aoe_Scheduler_Model_Schedule | Schedule this task to be executed as soon as possible | |
setCronExpr ( $expr ) | Bypass parent's setCronExpr is the expression is "always" This will break trySchedule, but always tasks will never be tried to scheduled anyway | |
setLastRunUser ( string | null $user = null ) : self | Set the user who ran the last successfully started schedule into a core variable |
Method | Description | |
---|---|---|
_beforeSave ( ) : Mage_Core_Model_Abstract | Processing object before save data | |
_getPdoWarning ( PDO $pdo ) : mixed | Retrieve the last PDO warning. | |
_startBufferToMessages ( ) | Redirect all output to the messages field of this Schedule. | |
_stopBufferToMessages ( ) | Stop redirecting all output to the messages field of this Schedule. | |
jobErrorContext ( ) | Switch the job error context | |
log ( $message, null $level = null ) | Log message to configured log file (or skip) | |
restoreErrorContext ( ) | Restore the original error context |
public _addBufferToMessages ( $buffer ) : string | ||
$buffer | ||
return | string |
protected _beforeSave ( ) : Mage_Core_Model_Abstract | ||
return | Mage_Core_Model_Abstract |
protected _getPdoWarning ( PDO $pdo ) : mixed | ||
$pdo | PDO | |
return | mixed |
protected _startBufferToMessages ( ) |
protected _stopBufferToMessages ( ) |
public addMessages ( $messages ) | ||
$messages |
public checkRunningAsCorrectUser ( ) : boolean | ||
return | boolean |
public getDuration ( ) : boolean | integer | ||
return | boolean | integer | time in seconds, or false |
public getErrorLogFile ( ) : string | ||
return | string |
public getJob ( ) : Aoe_Scheduler_Model_Job | ||
return | Aoe_Scheduler_Model_Job |
public getJobWasLocked ( ) : boolean | ||
return | boolean |
public getParameters ( ) : mixed | ||
return | mixed |
public getStarttime ( ) : string | ||
return | string |
public getStatuses ( ) : array | ||
return | array |
public initializeFromJob ( Aoe_Scheduler_Model_Job $job ) | ||
$job | Aoe_Scheduler_Model_Job |
public isAlwaysTask ( ) : boolean | ||
return | boolean |
public markAsDisappeared ( string $message = null ) : void | ||
$message | string | |
return | void |
public requestKill ( integer $time = null, string $message = null ) | ||
$time | integer | |
$message | string |
protected restoreErrorContext ( ) |
public saveMessages ( ) |
public scheduleNow ( ) : Aoe_Scheduler_Model_Schedule | ||
return | Aoe_Scheduler_Model_Schedule |
public setCronExpr ( $expr ) | ||
$expr |
public setLastRunUser ( string | null $user = null ) : self | ||
$user | string | null | Optional: if specified, overrides the default |
return | self |
protected string $_eventObject | ||
return | string |
protected string $_eventPrefix | ||
return | string |
protected bool $_redirect | ||
return | boolean |
protected $_redirectOutputHandlerChunkSize |
protected array $errorSettingsBackup | ||
return | array |