Asynchronous jobs in HumHub are used to run potentially heavy or scheduled tasks such as sending out summary mails, notifications or search index optimization. The following section describes how to setup automatic job execution required to handle such jobs. Since those settings are highly dependent on your server environment we can't assure those setting will work for your. If you have trouble setting up the job scheduling described in this guide, please contact your provider to ask for support.
There are two commands which needs to be scheduled:
- CronJob -
- Queue -
The cron command is used to run scheduled jobs which for example need to be executed hourly or daily. You can manually execute the cron command as follows:
The queue command is used to run asynchronous jobs which are potentially long running and therefore need to be executed in the background. The queue can either be scheduled as CronJob (see below) or with the help of another job-runner like for example Supervisor or Systemd. Please refer to the Asynchronous Tasks section for more details about queuing and job processing.
The queue command can be executed manually as follows:
As mentioned before, the CronJob configuration highly depends on your server environment. The following section is meant to help you with the CronJob setup and includes a guide for some common environments.
If you are not using any other job-runner like Supervisor or Systemd for your queue, both commands can
be scheduled as CronJob. Otherwise only the main
cron/run command needs to be scheduled as CronJob.
If you're on a shared hosting environment, you may need to add the
--isolate=0 option to the
/usr/bin/php /path/to/humhub/protected/yii queue/run --isolate=0.
Make sure to use the right php cli executable for your jobs!
CloudLinux (CentOS) 6
The following is a default setup for CloudLinux (CentOS) 6 and may not work for all users.
cPanel Hosted Server
The following is a default setup for cPanel Hosted Server and may not work for all users.
IIS Windows Server
Using Schtasks would be recommended over many other options for Windows 2012 and Windows 8 users.
Refer to this post
Create the following files then follow the above link.
See also CronJob Setup.
Please read up on this article.
See also CronJob Setup.
Please read up on this how-to guide.
Status and Troubleshooting
In case you encounter any issues with the job execution like unsent notifications or summary mails you can check
the job status under
Administration -> Information -> Background Jobs. Ideally the
Last run time of the CronJob Status
should be set and updated regularly. The value
Waiting of Queue Status should decrease or be empty,
Done value increases.
Troubleshooting can be done by checking the usual backend logs under
Administration -> Information -> Background Jobs
as well as using the following cron configuration to log the output of the command to a
The log output may give you some hints about the problem and ideally should either be empty or filled with some stats if the job ran correctly. The modification time of the file furthermore informs you about the last time the cron job ran.