Legacy
...
Passwork 5
Mapping LDAP security groups w...
Configuring Cron for Linux
10min
💡 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 passwork has a special script that synchronizes users /var/www/app/tools/ldap mapping php it can be run in manual mode or set to run in cron scheduler we recommend that you first test the script in manual mode to do this, run the script cd /var/www/app/tools/ php ldap mapping php the script will display the information on the screen and write it to its log file /var/www/app/logs/ldap mapping log 💡 make sure that the user on whose behalf you run the script 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 php /var/www/app/tools/ldap mapping php save the file scheduler will run the script after 20 minutes, the result of its work can be seen in the log file 💡 we recommend deleting the log file before running the cron for the first time configuring another user to run the script by default cron runs scripts as root user you can set it up to run as another user with more limited privileges for better security first, log in with the required user user su user run the script to make sure that everything works correctly as user cd /var/www/app/tools/ php ldap mapping php make sure that user has write permissions to /var/www/app/logs/ldap mapping log if the script worked without errors, set up a cron for the user ``user \# go back to root exit crontab u user e add the line /20 php /var/www/app/tools/ldap mapping php and save the file cron logs you can check the cron log by using the command journalctl u crond