MyBB Community Forums

Full Version: Using 'cron' instead of inline task schedule
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I moved MyBB (forum and DB) to a Linux based server. With this, I have the ability to use 'cron'. As we all know, MyBB uses an inline task scheduler. This is to solve a few tasking problems.
Is there a place that tells how to convert the tasks so that they'll use 'cron' (or can you tell me)? For example, I want the mails to be send out regardless of traffic in the forum.

Thanks,
Ori...
Yes sir,


Ryan Gordon Wrote:If you are running the task via a Cron Job:
  • In the program you use to setup a cron job set it up with the times you want and set the path to: php the/file/system/path/to/task.php x where x is the Task ID you want to run.
  • Make sure it is disabled in the ACP. Enabling it via the Task interface in the Admin CP Only tells MyBB to execute it via it's own scheduling system. Therefore this would cause 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 (e.x. "php the/file/system/path/to/task.php x")

Ryan