Setting up Cron for Linux
The Cron job scheduler is one of the components of the Linux operating system. It is used to run certain scripts on a schedule.
Passwork version 7 and above has a special script responsible for running background tasks:
- shell
php ./bin/console tasks:run
It can be run manually or configured to run via the Cron scheduler.
We recommend first checking the script operation manually. To do this, execute:
- DEB
- RPM
sudo -u www-data bash -c 'cd /var/www && php ./bin/console tasks:run'
sudo -u apache bash -c 'cd /var/www && php ./bin/console tasks:run'
Check the /var/www/files/logs/tasks/ folder for errors.
The user must have write permissions to the log folder
Setting up Cron
Configure it to run every minute:
- Open the Crontab settings for the web server user:
- DEB
- RPM
crontab -e -u www-data
crontab -e -u apache
- Add the following line and save the changes:
* * * * * cd /var/www/ && php ./bin/console tasks:run
Checking and fixing errors
Open Passwork and log in as Administrator/Owner, then go to the Background Tasks tab.
If configured correctly, a message will be displayed indicating that the scheduler is set up:

If you see a message that the scheduler is not set up, then execution errors are located in /var/www/files/logs/tasks/