Monday, 22 October 2012

Windows 7: Task scheduler - Run a batch file in the background on every 5 minutes

  1. Create a batch file called copy.bat with following command: xcopy C:\inetpub\wwwroot\GYMREG \\its3\users\staff\mah\Website\GYMREG /E /Y  
  2. Create a new task in task scheduler and run it on every 5 minutes.
  3. In order to run batch file on every 5 minutes you have to run the scheduled task with another user not using the user normally will be logged on. For example if you login on your pc using mah account then you should run the scheduled task using its2 or any other account.
  4. The box for "Do not store password" also says "The task will only have access to local resources." As my task didn't need network access, I thought leaving this box checked was OK.  I un-checked it, and now the task runs with no users logged in.  The XML changed from

No comments:

Post a Comment