How to configure a SQL Agent job to launch a bat file

Create a new SQL Agent job
In the general tab :
-specify a name
-specify the type : “Operating system (cmdexec)”
-specify the command :
cmd.exe /c “D:\Myfolders\myscript.bat”

2019-03-05_10h31_12

Remark :
/c is an argument of the cmd command, meaning : “Carries out the command specified by string and then terminates”

Leave a comment