phpBB API Documentation
Interface

phpbb\cron\task\task

interface task

Cron task interface

Methods

string get_name()

Returns the name of the task.

null run()

Runs this cron task.

bool is_runnable()

Returns whether this cron task can run, given current board configuration.

bool should_run()

Returns whether this cron task should run now, because enough time has passed since it was last run.

Details

at line 26
public string get_name()

Returns the name of the task.

Return Value

string Name of wrapped task.

at line 33
public null run()

Runs this cron task.

Return Value

null

at line 43
public 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.

Return Value

bool

at line 51
public bool should_run()

Returns whether this cron task should run now, because enough time has passed since it was last run.

Return Value

bool