Legacy
...
Passwork 5
Mapping LDAP security groups w...
Configuring Cron for Linux + Docker
6 min
💡 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) /server/sites/prod/app/tools/ldap mapping php 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 docker exec t user www data php php /server/sites/prod/app/tools/ldap mapping php the script will display the information on the screen and write it to its log file /server/sites/prod/app/logs/ldap mapping log make sure the user www data has write permissions to the logs folder configuring cron in this example, we will show how to configure cron to run a script every 20 minutes open cron's configuration file crontab e add the line /20 /usr/bin/docker exec t user www data php php /server/sites/prod/app/tools/ldap mapping php 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 cron logs you can check the cron log by using the command journalctl u crond