Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
ScheduledTask Class Reference
Inheritance diagram for ScheduledTask:
BooksForReviewReminder FileLoader OpenAccessNotification ReviewReminder SubscriptionExpiryReminder UsageStatsLoader

Public Member Functions

 _getAllMessageTypes ()
 
 _newProcessId ()
 
 execute ()
 
 getName ()
 
 getProcessId ()
 
 notify ($type, $message, $subject= '')
 
 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 22 of file ScheduledTask.inc.php.

Member Function Documentation

ScheduledTask::_getAllMessageTypes ( )

Get all schedule task message types.

Returns
array

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

Referenced by notify().

ScheduledTask::_newProcessId ( )

Set a new process id.

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

Referenced by ScheduledTask().

ScheduledTask::execute ( )

Fallback method in case task does not implement execute method.

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

ScheduledTask::getName ( )

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

Returns
string

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

Referenced by notify().

ScheduledTask::getProcessId ( )

Get this process id.

Returns
int

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

Referenced by notify().

ScheduledTask::notify (   $type,
  $message,
  $subject = '' 
)

Notify the site administrator via email about the task process.

Parameters
$typestring One of the SCHEDULED_TASK_MESSAGE_TYPE... constants
$messagestring
$subjectstring (optional)

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

References _getAllMessageTypes(), getName(), and getProcessId().

Referenced by FileLoader\_moveFile(), FileLoader\checkFolderStructure(), and FileLoader\execute().


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