Administration
Background tasks
Configuring Windows Task Scheduler
5min
task scheduler is a utility built into windows that allows you to automatically run programs or scripts on a schedule or when specified conditions occur passwerk version 7 and higher has a special script that is responsible for running background tasks powershell php \bin\console tasks\ run it can be executed manually or set to run on a schedule using windows tasks scheduler we recommend that you first test the script in manual mode to do this, perform the following actions in powershell powershell cd c \inetpub\wwwroot\passwork php \bin\console tasks\ run if the error indicates that there is no php exe utility to run the background task, then the php directory should be added to the path environment variable check the file c \inetpub\wwwroot\passwork\var\log\tasks log for errors make sure that the user on whose behalf the script is executed has write permissions configuring task scheduler run powershell as administrator right click on the start icon in the lower left corner of the screen; select windows powershell (administrator) from the context menu create a task in the scheduler to run the script powershell register scheduledtask ` action (new scheduledtaskaction execute "powershell exe" argument "php \bin\console tasks\ run" workingdirectory "c \inetpub\wwwroot\passwork") ` taskname "passwork task" settings (new scheduledtasksettingsset allowstartifonbatteries startwhenavailable hidden priority 5) ` trigger (new scheduledtasktrigger once at (get date) repetitioninterval (new timespan minute 1)) ` runlevel highest user "administrator" password "password" force the following parameters should include details of the user on whose behalf the task will run user — username; password — user password we recommend using the local administrator account to avoid any problems with permissions testing and troubleshooting open passwork and log in as administrator/owner and click the background tasks tab if the configuration is correct, a message will be displayed that the scheduler is configured if you see a message that the scheduler is not configured, the execution errors are located in the log file c \inetpub\wwwroot\passwork\var\log\tasks log if you need help solving the problem, you can send this file to passwork technical support