• 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 Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2012:
    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 arguments, add the following:

    /q /c "c:\batchfiles\mybatchfile.bat"



    Share
     

    3 responses to “Run a Batch File as a Scheduled Task” RSS icon

    • I tried the solution suggested but it did not work , even though when running the .bat file it is executed successfully
      Windows 2003

    • You forgot to place the script in quotes

      C:WINDOWSsystem32cmd.exe /c /q “path to your script.bat”

      /c is to start a new instance of the script
      /q is to not display anything on the scree or “Silent”

    • Done …….. Thanks


    1 Trackbacks / Pingbacks

    Leave a reply