Configure scheduled tasks

To use Pimcore’s scheduler, it is necessary to set up a scheduled task/cronjob. Check if they are working by running the following command:

$ sudo crontab -u bitnami -l

You should see the following output in case that the cronjob was successfully enabled:

*/5 * * * * sudo su daemon -s /bin/bash -- /opt/bitnami/php/bin/php /opt/bitnami/apps/pimcore/htdocs/bin/console -vvv maintenance

IMPORTANT: It is strongly recommended to run the task every 5 minutes, but if that is not possible, it should run every 10 minutes. If you prefer, you can also run the task every minute, since Pimcore recognizes if there is an active job and executes only those jobs which are not active.

In case they are disabled, run Pimcore scheduler following the steps below::

  • Run the following command to edit the crontab file:

      $ sudo crontab -u bitnami -e
  • Add the following lines to the file. The jobs will be executed the first minute of every hour. You can modify the timing if you wish:

      */5 * * * * sudo su daemon -s /bin/bash -- /opt/bitnami/php/bin/php /opt/bitnami/apps/pimcore/htdocs/bin/console -vvv maintenance
  • Save the file and exit.

If you want the jobs to be executed in a multithreaded manner and utilize the multithreaded job manager, enable pcntl in PHP. If pcntl is not available, jobs are processed in a sequential manner.

Last modification September 3, 2018