I had a .bat file that ran the SQL Azure Migration Wizard Batch Backup utility. When I double clicked or ran the.bat in a command window it worked. When I scheduled the task to run the Task Scheduler reported the task completed, but it clearly had not run. What was going on?
It turns out that in the Task Actions dialog I had set ‘Program/script’ to (not unsurprisingly) point to the script:
cmd /c c:\SqlAzureBackup\BackupDatabase.bat
When really what I needed was:
Program/script: cmd Add arguments: /c BackupDatabase.bat Start in: c:\SqlAzureBackup\