
Public Member Functions | |
| checkFrequency ($className, $frequency) | |
| execute () | |
| executeTask ($className, $args) | |
| getTaskArgs ($task) | |
| isInNumericRange ($value, $min, $max) | |
| isInRange ($rangeStr, $currentValue, $lastTimestamp, $timeCompareStr, $cutoffTimestamp) | |
| parseTasks ($file) | |
| runScheduledTasks ($argv=array()) | |
| usage () | |
Definition at line 26 of file runScheduledTasks.php.
| runScheduledTasks.checkFrequency | ( | $ | className, | |
| $ | frequency | |||
| ) |
Check if the specified task should be executed according to the specified frequency and its last run time.
| $className | string | |
| $frequency | XMLNode |
Definition at line 150 of file runScheduledTasks.php.
References isInRange().
Referenced by parseTasks().
| runScheduledTasks.execute | ( | ) |
Parse and execute the scheduled tasks.
Definition at line 68 of file runScheduledTasks.php.
References parseTasks().
| runScheduledTasks.executeTask | ( | $ | className, | |
| $ | args | |||
| ) |
Execute the specified task.
| $className | string the class name to execute | |
| $args | array the array of arguments to pass to the class constructors |
Definition at line 110 of file runScheduledTasks.php.
Referenced by parseTasks().
| runScheduledTasks.getTaskArgs | ( | $ | task | ) |
Get the arguments for a task from the parsed XML.
| XMLNode |
Definition at line 131 of file runScheduledTasks.php.
Referenced by parseTasks().
| runScheduledTasks.isInNumericRange | ( | $ | value, | |
| $ | min, | |||
| $ | max | |||
| ) |
Check if a numeric value is within the specified range.
| $value | int | |
| $min | int | |
| $max | int |
Definition at line 255 of file runScheduledTasks.php.
Referenced by isInRange().
| runScheduledTasks.isInRange | ( | $ | rangeStr, | |
| $ | currentValue, | |||
| $ | lastTimestamp, | |||
| $ | timeCompareStr, | |||
| $ | cutoffTimestamp | |||
| ) |
Check if a value is within the specified range.
| $rangeStr | string the range (e.g., 0, 1-5, *, etc.) | |
| $currentValue | int value to check if its in the range | |
| $lastTimestamp | int the last time the task was executed | |
| $timeCompareStr | string value to use in strtotime("-X $timeCompareStr") | |
| $cutoffTimestamp | int value will be considered valid if older than this |
Definition at line 204 of file runScheduledTasks.php.
References isInNumericRange().
Referenced by checkFrequency().
| runScheduledTasks.parseTasks | ( | $ | file | ) |
Parse and execute the scheduled tasks in the specified file.
| $file | string |
Definition at line 76 of file runScheduledTasks.php.
References checkFrequency(), executeTask(), and getTaskArgs().
Referenced by execute().
| runScheduledTasks.runScheduledTasks | ( | $ | argv = array() |
) |
Constructor.
| $argv | array command-line arguments If specified, the first parameter should be the path to a tasks XML descriptor file (other than the default) |
Definition at line 40 of file runScheduledTasks.php.
References CommandLineTool.$argv, and DAORegistry.getDAO().
| runScheduledTasks.usage | ( | ) |
Print command usage information.
Reimplemented from CommandLineTool.
Definition at line 60 of file runScheduledTasks.php.
1.5.6