Task System

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