|
Open Monograph Press
3.3.0
|
Public Member Functions | |
| __construct ($email='', $contactName='') | |
| getMail () | |
| getMessage ($executionLogFile) | |
| notifyExecutionResult ($id, $name, $result, $executionLogFile='') | |
Static Public Member Functions | |
| static | checkFrequency ($className, $frequency) |
| static | clearExecutionLogs () |
| static | downloadExecutionLog ($file) |
| static | getTaskArgs ($task) |
Data Fields | |
| $_contactEmail | |
| $_contactName | |
Helper class for common scheduled tasks operations.
Definition at line 22 of file ScheduledTaskHelper.inc.php.
| ScheduledTaskHelper::__construct | ( | $email = '', |
|
$contactName = '' |
|||
| ) |
Constructor. Ovewrites both parameters if one is not passed.
| string (optional) | |
| $contactName | string (optional) |
Definition at line 42 of file ScheduledTaskHelper.inc.php.
References DAORegistry\getDAO().
|
static |
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 89 of file ScheduledTaskHelper.inc.php.
References DAORegistry\getDAO().
Referenced by PKPAcronPlugin\_getTasksToRun(), and ScheduledTaskTool\parseTasks().
|
static |
Clear tasks execution log files.
Definition at line 190 of file ScheduledTaskHelper.inc.php.
Referenced by AdminHandler\clearScheduledTaskLogFiles().
|
static |
Download execution log file.
| $file | string |
Definition at line 201 of file ScheduledTaskHelper.inc.php.
Referenced by AdminHandler\downloadScheduledTaskLogFile().
| ScheduledTaskHelper::getMail | ( | ) |
| ScheduledTaskHelper::getMessage | ( | $executionLogFile | ) |
Get execution log email message.
| $executionLogFile | string |
Definition at line 170 of file ScheduledTaskHelper.inc.php.
References PKPApplication\get(), and Application\getNameKey().
Referenced by notifyExecutionResult().
|
static |
Get the arguments for a task from the parsed XML.
| XMLNode |
Definition at line 70 of file ScheduledTaskHelper.inc.php.
Referenced by PKPAcronPlugin\_parseCrontab(), and ScheduledTaskTool\parseTasks().
| ScheduledTaskHelper::notifyExecutionResult | ( | $id, | |
| $name, | |||
| $result, | |||
$executionLogFile = '' |
|||
| ) |
Notifies site administrator about the task execution result.
| $id | int Task id. |
| $name | string Task name. |
| $result | boolean Whether or not the task execution was successful. |
| $executionLogFile | string Task execution log file path. |
Definition at line 144 of file ScheduledTaskHelper.inc.php.
References getMessage(), and Config\getVar().
| string ScheduledTaskHelper::$_contactEmail |
Contact email.
Definition at line 28 of file ScheduledTaskHelper.inc.php.
| string ScheduledTaskHelper::$_contactName |
Contact name.
Definition at line 34 of file ScheduledTaskHelper.inc.php.