WSL2 REST API Error due to WSL2 clock out of sync with Windows clock [closed]

In case anyone finds this via search and doesn’t notice that there is actually a solution listed in the question, you can fix WSL clock drift via. sudo hwclock -s If you just need to do it occasionally, this is a fine solution. If you need to do it more frequently, consider @piouson’s solution.

Run a python script in virtual environment from windows task scheduler

Create batch file with these commands: c:\__full_path_to_virtualenv__\Scripts\activate.bat && python __full_path_to_python_script__.py && means run command2 if command1 completed successfully. Then set that batch file as script to run. You don’t need to set any additional arguments in task scheduler (or you can set them in batch file anyway) and can set Start in if script has … Read more

Specifying the running directory for Scheduled Tasks using schtasks.exe

Just wanted to add details that are valid for Windows Server 2008 and 2012. As many people can understand screen shots better here is a screen shot: To sum it up. When you create the action for your scheduled task you have the option to set the “Start in (optional)” field (rounded in red on … Read more

Windows Task Scheduler doesn’t start batch file task

Make sure you set the ‘Start in’ and ‘Program/script’ options correctly. If your file address is: C:\Temp\foo.bat, set the ‘start in’ option to ‘C:\Temp’ and the ‘Program/script’ option to ‘foo.bat’. To set the ‘Start in’ option: Right click task in the task scheduler > Properties > Actions > Edit. If this alone doesn’t work then … Read more

The operator or administrator has refused the request task scheduler

In my case, the error message “The operator or administrator has refused the request” meant that a previous instance of the task has still been running and the task was configured to not start a new instance if it’s already running (the default configuration), so the Task Scheduler refused to start a new instance when … Read more

Windows Scheduled task succeeds but returns result 0x1

It seems many users are having issues with this. Here are some fixes: Right click on your task > “Properties” > “Actions” > “Edit” | Put ONLY the file name under ‘Program/Script’, no quotes and ONLY the directory under ‘Start in’ as described, again no quotes. Right click on your task > “Properties” > “General” … Read more

Task Scheduler failed to start. Additional Data: Error Value: 2147943726

Today I got the same problem, (HRESULT) 0x8007052e (2147943726) “unknown user name or bad password” My solution: was to Re-Asign the User on the “Change User or Group” button to get the lattest Active Directory information of the User. Then I could Run the Task Again… As a better practice, you could use an “Aplicative” … Read more

Why does my Task Scheduler task fail with error 2147942667?

To get the relevant error message: Convert 2147942667 to hex: 8007010B Take last 4 digits (010B) and convert to decimal: 267 In a Command Prompt, run net helpmsg 267 Result: “The directory name is invalid.” The solution for me was that I had quotes in the “Start In” field. I found this information in Microsoft … Read more