base
abstract class base implements task
Cron task base class. Provides sensible defaults for cron tasks and partially implements cron task interface, making writing cron tasks easier.
At a minimum, subclasses must override the run() method.
Cron tasks need not inherit from this base class. If desired, they may implement cron task interface directly.
Methods
Returns the name of the task.
Sets the name of the task.
Returns whether this cron task can run, given current board configuration.
Returns whether this cron task should run now, because enough time has passed since it was last run.
Details
at line 34
string
get_name()
Returns the name of the task.
at line 44
set_name(string $name)
Sets the name of the task.
at line 57
bool
is_runnable()
Returns whether this cron task can run, given current board configuration.
For example, a cron task that prunes forums can only run when forum pruning is enabled.
at line 68
bool
should_run()
Returns whether this cron task should run now, because enough time has passed since it was last run.