Backup failing when running under Task Scheduler

Oct 8, 2012 at 11:01 AM

I've set up an domain account for running backups, and if I login with the backup user and run the .bat file with admin permissions, the backup runs just fine.

I've tried scheduling a task for running every night. I've set the running as user to the backup account, and checked "Run with highest privileges". But it always exits immediately with cmd.exe having a return code of 1. Nothing is written to the backup script's log either.

Coordinator
Oct 16, 2012 at 4:42 PM
Edited Oct 16, 2012 at 5:55 PM

Sorry for the late reply. I am on holiday/vacation at the moment.

As you have identified, the script isn't the issue here, it's the scheduled task and how you have configured it.

I have encountered this before and it's a baffling one to say the least.

To solve it:  Add the path to folder where the .bat file is in the Start In (optional): field

So for example: D:\Scripts\Farm-Backup

Hope this helps.

Oct 24, 2012 at 6:35 AM

That was exactly what was missing. Now the script runs just as expected.

Thanks alot!