Open Journal Systems  2.4.8
 All Classes Namespaces Functions Variables Groups Pages
ScheduledTask Class Reference
Inheritance diagram for ScheduledTask:
BooksForReviewReminder CrossrefInfoSender DataciteInfoSender FileLoader ObjectsForReviewReminder OpenAccessNotification ReviewReminder SubscriptionExpiryReminder

Public Member Functions

 addExecutionLogEntry ($message, $type=null)
 
 execute ()
 
 executeActions ()
 
getHelper ()
 
 getName ()
 
 getProcessId ()
 
 ScheduledTask ($args=array())
 

Detailed Description

Base class for executing scheduled tasks. All scheduled task classes must extend this class and implement execute().

See Also
ScheduledTaskDAO

Definition at line 20 of file ScheduledTask.inc.php.

Member Function Documentation

ScheduledTask::addExecutionLogEntry (   $message,
  $type = null 
)

Add an entry into the execution log.

Parameters
$messagestring A translated message.
$typestring (optional) One of the ScheduledTaskHelper SCHEDULED_TASK_MESSAGE_TYPE... constants.

Definition at line 98 of file ScheduledTask.inc.php.

References Core\getCurrentDate().

Referenced by FileLoader\_archiveFile(), FileLoader\_claimNextFile(), UsageStatsLoader\_getAssocFromUrl(), FileLoader\checkFolderStructure(), execute(), UsageStatsLoader\executeActions(), FileLoader\executeActions(), and FileLoader\moveFile().

ScheduledTask::execute ( )

Make sure the execution process follow the required steps. This is not the method one should extend to implement the task actions, for this see ScheduledTask::executeActions().

Parameters
boolean$notifyAdminoptional Whether or not the task will notify the site administrator about errors, warnings or completed process.
Returns
boolean Whether or not the task was succesfully executed.

Definition at line 145 of file ScheduledTask.inc.php.

References addExecutionLogEntry(), executeActions(), getHelper(), getName(), and Config\getVar().

ScheduledTask::executeActions ( )

Implement this method to execute the task actions.

Definition at line 126 of file ScheduledTask.inc.php.

Referenced by execute().

& ScheduledTask::getHelper ( )

Get scheduled task helper object.

Returns
ScheduledTaskHelper

Definition at line 78 of file ScheduledTask.inc.php.

Referenced by execute().

ScheduledTask::getName ( )

Get the scheduled task name. Override to define a custom task name.

Returns
string

Definition at line 88 of file ScheduledTask.inc.php.

Referenced by execute(), and ScheduledTask().

ScheduledTask::getProcessId ( )

Get this process id.

Returns
int

Definition at line 70 of file ScheduledTask.inc.php.

Referenced by ScheduledTask().

ScheduledTask::ScheduledTask (   $args = array())

Constructor.

Parameters
$argsarray

Definition at line 39 of file ScheduledTask.inc.php.

References getName(), getProcessId(), and AppLocale\requireComponents().


The documentation for this class was generated from the following file: