Batch file not running in task scheduler


  • Hi

    Windows Server 2012 with Essentials role.

    I am running a batch file in a task but it does not run. I get this;

    Task Scheduler successfully completed task "\FullDBBackup" , instance "{af570e8c-602b-45f6-80a4-b2d49f8b47d0}" , action "C:\Windows\SYSTEM32\cmd.exe" with return code 2147942401.

    I have tried various things;

    • Made sure task is run with highest privileges.
    • Added path in 'Start In'.
    • Added /c in 'Add arguments'.
    • Added C:\Windows\system32\cmd.exe before batch name.
    • Used UNC instead of shared drive.

    This is the first time I have had issue with task scheduler and is very intriguing. What am I doing wrong?



    Friday, October 06, 2017 3:52 PM

All replies

  • Hi,

    Please try to disable UAC temporarily, then, manually start the task and check the result. 

    Besides, whether this Batch file will run when manually start it on your server(double click it to run).

    Best Regards,
    Eve Wang

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Monday, October 09, 2017 9:43 AM
  • Hi Eve

    UAC is already disabled. Manually running the task returns error 0x1. Screen below.



    Tuesday, October 10, 2017 3:42 PM
  • Hi,

    I am having the exact same problem - Task says it ran and completed successfully but the job wasn't done. Run the batch file directly and it works, just won't via task scheduler.

    • Edited by naellis Thursday, October 12, 2017 10:16 AM
    Thursday, October 12, 2017 10:15 AM