Configuring Windows Server Scheduler
Windows Task Scheduler is a component of the Windows operating system. It is used to run certain scripts on the server at the right time, on a schedule.
Starting with version 5.1.0 there is a special script which is responsible for running the background tasks:
It can be run manually or configured to run on a schedule using Windows Task Scheduler.
We recommend that you first check how the script works in the manual mode. To do this, run the following script at the Windows command prompt:
The script will write information to its log file:
💡 Make sure that the user you are running the script from has write permissions to the logs folder
Let’s configure the Windows Task Scheduler to execute a script every single minutes.
Open the task scheduler by pressing the Win + R keyboard shortcut and enter taskschd.msc:
The scheduler window will appear:
On the panel on the right, select the "Create task" command. The task creation window will appear. Enter a name and description:
After that, choose how often you want to start the process by creating a new trigger on the "Triggers" tab:
Set the task to be performed every minute:
Create a new action on the Actions tab:
Specify the path to the php.exe (version 8.0) executable file used on your system.
Add arguments:
Start in
Click "Ok". The scheduler will launch the script in 1 minute, the result of its work can be seen in the log file. You can also select the created task and start it immediately:
💡 We recommend deleting the log file before starting the scheduler for the first time.
Go to Passwork under the administrator and open the Background tasks page.
If you see a message that the scheduler is not configured, runtime errors can be found in the log file:
You can view the scheduler log in the Event Viewer in Windows by the path "Application and Services logs → Microsoft → Windows → TaskScheduler → Operational"