Hi,
I have a file located in c:\sample\file.exe. Now i want to execute file.exe every night.How can i achive this using batch file?
Please help me out
Hi,
I have a file located in c:\sample\file.exe. Now i want to execute file.exe every night.How can i achive this using batch file?
Please help me out
Under the Control Panel, there's a applet called Scheduled Tasks. This is usually how you set up, um, what was it again, yes, that's it, scheduled tasks :-)
If you really want to do this from a batch file rather than a nice GUI (e.g., you're doing it as a part of some silent install), you use either at
or schtasks
. See here for details, or use this as a template:
schtasks
/create # Create a task.
/tn SampleFile # This is its name.
/tr c:\sample\file.exe # This is the file to run.
/sc daily # Every day.
/st 23:55 # At five minutes to midnight.
/ru User # User name to use.
/rp Password # Password of that user.
See the afore-mentioned page for even more options.