How to schedule a task every 5 minutes on a Windows command prompt?

I am currently scheduling .bat files using the Windows Task Scheduler. However, I want to do this with the schtasks command line schtasks . My batch file should run every five minutes and repeat my task every day.

+10
source share
1 answer

I don't have much experience with a .bat file (and maybe what I'm going to write is pointless), but I was wondering if GOTO and delay could solve your problem.

 :label <do stuff> SLEEP 300 GOTO label 

LE: Well, I found something that could help you:

 schtasks /create /sc minute /mo 5 /tn "TaskName" /tr \\scripts\whatever.bat 

This line should do the trick. For more information, you can visit https://technet.microsoft.com/en-us/library/cc772785(v=ws.10).aspx

+13
source

Source: https://habr.com/ru/post/983318/


All Articles