Skip to content

Instantly share code, notes, and snippets.

@p
Created April 15, 2010 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p/366810 to your computer and use it in GitHub Desktop.
Save p/366810 to your computer and use it in GitHub Desktop.
/**
* Cron task interface
* @package phpBB3
*/
interface cron_task
{
/**
* Runs this cron task.
*/
public function run();
/**
* 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.
*/
public function isRunnable();
/**
* Returns whether this cron task should run now, because enough time
* has passed since it was last run.
*/
public function shouldRun();
/**
* Returns whether this cron task can be run in shutdown function.
*/
public function isShutdownFunctionSafe();
}
/**
* Parametrized cron task interface
* @package phpBB3
*/
interface parametrized_cron_task extends cron_task {
/**
* Returns parameters of this cron task as a query string.
*/
public function getUrlQueryString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment