0
votes

enter image description hereI have a simple batch files that executes when run manually, however when run via task scheduler it errors with a 0x1 code.

1
Try using double quotes around the path of batch file. if current working directory matters, set it correctly from task scheduler. And if you share more (like path, error message), someone will help youOzan
1. remove @echo off in the batch file and append pause to it, so you might already see what causes the failure; 2. provide (sample) code of the batch file; 3. it would be very helpful if you'd describe the Windows Task Scheduler settings;aschipfl

1 Answers

0
votes

You should uncheck the box that says "Run whether user is logged in or not."

Certain batch functions require permissions to actually work, so if this is being run while no user is logged in, it can cause an error due to insufficient permissions.