Skip to content

Cron task processing

Daniël Klabbers edited this page Nov 30, 2018 · 5 revisions

Bazaar offers the ability to offload the processing of extension actions in the background since version 0.3. Instead of firing the action immediately, a task is scheduled to be processed by a cronjob. Most hosting environment, even shared ones, allow you to configure a cronjob.

Enable

Go into the extension settings modal and enable the "use crons for task processing" toggle.

Configure

Behind the scenes Bazaar uses Laravel task scheduling by using the flagrow/console package. As such there is only one cron schedule you need to configure:

* * * * * php /<path/to/flarum>/flarum schedule:run >> /dev/null 2>&1

This will fire any pending background tasks. Now simply go into your admin panel and start installing, uninstalling and updating extensions. Please note that your Forum might be intermittently unavailable when the task finishes, this is caused by the vendor folder being replaced by the temporary installation folder vendor2.

As the background task processing re-uses most of the logic we previously had, you are still able to identify issues inside your Bazaar tasks page.

You can’t perform that action at this time.