Configuring Cron for Linux + Docker
💡 This is obsolete documentation for older versions of Passwork (before 5.1.0).
Starting from version 5.1.0 Passwork uses built-in background task mechanisms for LDAP synchronization.
The Cron is a component of the Linux operating system. It is used to run certain scripts on a server at the right time, according to a schedule.
In Passwork there is a special script that synchronizes users (in the php container):
You can execute it manually or set up a Cron scheduler to execute it. We recommend that you first test the script in manual mode. To do this, execute the script
The script will display the information on the screen and write it to its log file:
Make sure the user www-data has write permissions to the logs folder
In this example, we will show how to configure Cron to run a script every 20 minutes.
Open Cron's configuration file
Add the line
Save the file. The scheduler will run the script after 20 minutes, the result of his work can be seen in the log file.
💡 We recommend deleting the log file before running cron for the first time
You can check the cron log by using the command