CmsRegularTask View code

Extends

An interface to define how tasks should work.

package

CMS

license

GPL

since 1.8

Methods

get_name() : string

Get the name for this task

Response

string

get_description() : string

Get the description for this task.

Response

string

test(integer $time = '') 

Test if a function should be executed given the supplied time argument

Arguments

integer $time

The time at which any comparisons for execution should be performed. If empty the current time is assumed.

execute(integer $time = '') : boolean

Execute a given task

Arguments

integer $time

The time at which the task should consider the execution occurred at. Assume the current time if empty.

Response

boolean

TRUE on success, FALSE otherwise.

on_success(integer $time = '') 

Execute steps that should be taken on success of this task.

This method is called after the execute step if the execute step returned TRUE.

Arguments

integer $time

The time at which the task should consider the execution occurred at. Assume the current time if empty.

on_failure(integer $time = '') 

Execute steps that should be taken on failure of this task.

This method is called after the execute step if the execute step returned FALSE.

Arguments

integer $time

The time at which the task should consider the execution occurred at. Assume the current time if empty.