martes, septiembre 26, 2017

Schedule a task command line task with windows task scheduler.

Scheduling a command on the windows task scheduler can be tricky. So below some things to have in mind.

In the "Action" tab:
1- start program

2- Program/script: C:\Windows\System32\cmd.exe

3- Add arguments: /c nameOfTheScript.bat
    If you wanna log error use the following:
     script.bat > logall.txt 2>&1
     If you wanna append on the the file:
     script.bat >> logall.txt 2>&1
 4- Start In:  c:/someDir (without the back slash)


No hay comentarios.: