Legacy
...
Passwork 5
Mapping LDAP security groups w...

Configuring Cron for Linux + Docker

6min

💡 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):

Shell


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

Shell


The script will display the information on the screen and write it to its log file:

Shell


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

Shell


Add the line

Shell


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

Shell