Run a Batch File as a Scheduled Task
Sometimes the most mundane daily tasks can be simplified with a simple batchfile. Say you have a USB drive that you keep your files on that you copy files to several times a day. You could invest in synchronization software, or you could just create a batch file that will copy the files for you. I am paranoid so I like to backup files at least once a day, this is how you setup a scheduled task to run a batch file. If you need help writing a batch file, just leave a comment.
In Windows NT/2000/XP/2003:
1. Go to the Control Panel, and under Scheduled Tasks, select Add Scheduled Task.
2. When asked what program, select Command Prompt.
3. Give it a name and a time to execute.
4. Set the user permissions.
5. On the last page, select open advanced properties.
6. Now adjust the run command adding /q /c c:\batchfiles\mybatchfile.bat, mine looks like this:
C:\WINDOWS\system32\cmd.exe /q /c c:\batchfiles\mybatchfile.bat
You can now test it out, if it does not run, make sure all the permissions are setup properly.
In Vista/2008/Windows 7
1. Access the Administrative Tools under the Control Panel.
2. Select the Task Scheduler.
3. Select Create Basic Task on Actions menu.
4. Step through the setup.
5. When asked for action, select Start a program
6. Select Browse, then find cmd.exe in the Windows/system32 folder.
7. Under Add arguements, add the following:
/q /c c:\batchfiles\mybatchfile.bat1 comment command line, Microsoft, Server 2008, Windows 2000, Windows 7, Windows NT, Windows Vista, Windows XP
I tried the solution suggested but it did not work , even though when running the .bat file it is executed successfully
Leave a reply