Run a batch file with Windows task scheduler
I faced the same problem, but I found another solution without having to modify my batch script.
The only thing that I missed out is at the 'Action' settings - "Start in (Optional)" option.
Go the task properties --> Action tab --> Edit --> Fill up as below:
- Action: Start a program
- Program/script: path to your batch script e.g.
C:\Users\beruk\bodo.bat
- Add arguments (optional): <if necessary - depending on your script>
- Start in (optional): Put the full path to your batch script location e.g.
C:\Users\beruk\
(Do not put quotes around Start In)
Then Click OK
It works for me. Good Luck!
Make sure "Start In " has NO QUOTES.
For those whose bat files are still not working in Windows 8+ Task Scheduler , one thing I would like to add to Ghazi's answer - after much suffering:
1) Under Actions, Choose "Create BASIC task", not "Create Task"
That did it for me, plus the other issues not to forget:
- Use the Start In path to your batch file, even though it says optional
- use quotes, if you need to, in your Start a program > program/script entry i.e "C:\my scripts\runme.bat" ...
- BUT DON'T use quotes in your Start in field. (Crazy but true!)
This worked without any need to trigger a command prompt.
(Sorry my rep is too low to add my Basic Task tip to Ghazi's comments)
None of the above method worked. I tried it this way as said it in a tutorial and it worked.
Action:
Start a program
Program/script:
cmd
Add arguments:
/c start "" "E:\Django-1.4.1\setup.bat"
Worked for me on Win7 Pro. You must have an account with a password (blank passwords are no good)