MyBB Documentation

Task System

The 1.6 Documentation is no longer maintained and some information may be outdated.

The MyBB 1.6 series reached end of life on October 1, 2015.

This means there will be no more security or maintenance releases for these series and forums running these versions of MyBB may be at risk of unfixed security issues. All administrators are strongly encouraged to upgrade their forums to the latest release of MyBB as soon as possible.

MyBB Tasks are PHP scripts run at set intervals which typically maintain your database and board, as well as perform tasks for some features, such as mass mail and group promotions.

The Task System, unless setup on a cron job, can only run when a user visits the front-end of your forum. In addition, other tasks might have priority and it will take a continual flow of visitors if your tasks are to run always on time.

To run tasks via a cron job, you must do the following:

  • In the program you use to setup a cron job set it up with the times you want and set the path to (where x is the Task ID you want to run):
php the/file/system/path/to/task.php x
  • Make sure the task is disabled in the Admin CP. Enabling it via the Task interface in the Admin CP only tells MyBB to execute it via its own scheduling system. Having the task enabled and running it via a cron job would cause an overlap. The task, if called from a cron job, will run regardless of the status of it in the ACP as this only applies to MyBB's own systems.

You can also test the cron job by using PHP's CLI interface via the same way you set it up for the cron job. An example of this:

php the/file/system/path/to/task.php x

Edit this page on GitHub