How to run a task every x minutes ?

Elegost3000

Honorable
Jun 5, 2014
172
0
10,710
I need to schedule an exe file to run every day every 10 minutes but i have no idea how to set a task let alone run it daily every 10min. Simple question.
 
Solution
This can be done pretty easily in Task Scheduler.

Run Task Scheduler.
On the right choose Create Task.
Give it a name, anything will do. I'll call mine NotepadRunner.
Go to the Trigger tab and choose New.
Check "Repeat task every" and choose "10 Minutes".
Choose OK to close the Trigger dialog.
Go to the Action tab and choose New.
Under Program/Script, choose Browse and select your EXE. I just typed in Notepad.exe
Go to the Settings tab and uncheck "Stop the task if it runs longer than".
Choose OK to close the Create Task dialog.

On the left, Go to Task Scheduler (Local) / Task Scheduler Library and you should see your new Task there. You can edit/delete/disable it from there if needed. There are many more options available with Task...
If Windows, several ways. A batch, powershell, or VBScript would be a bit resource intensive and it would need to always be running. You could simply loop a command to launch the execute, put in a wait or pause statement for 10 minutes and just never exit the loop. You could set up such a task using the task scheduler. A Windows service would probably be worth a look into if this is a more permanent solution.

If it isn't Windows, then I'm not 100% sure. Don't really know enough about Linux/Unix development to say. Though I suppose you could always write a program to do it. Maybe something could be done with BASH.
 
This can be done pretty easily in Task Scheduler.

Run Task Scheduler.
On the right choose Create Task.
Give it a name, anything will do. I'll call mine NotepadRunner.
Go to the Trigger tab and choose New.
Check "Repeat task every" and choose "10 Minutes".
Choose OK to close the Trigger dialog.
Go to the Action tab and choose New.
Under Program/Script, choose Browse and select your EXE. I just typed in Notepad.exe
Go to the Settings tab and uncheck "Stop the task if it runs longer than".
Choose OK to close the Create Task dialog.

On the left, Go to Task Scheduler (Local) / Task Scheduler Library and you should see your new Task there. You can edit/delete/disable it from there if needed. There are many more options available with Task Scheduler than what I went over, but those basics should get you started.
 
Solution


I made the task using Task Scheduler but even though i set it up to run at startup and disabled any options that would kill the process when i startup my PC it still says ready instead of running and i have to manually make it run

edit: It also stops running and says ready as soon as i close the task scheduler,i don't know what the issue is
 
Try to delete the task and re-create it once again. Be sure to only change the options that I mentioned above. If you are running on a battery powered laptop, you may want to see the Power section under the Conditions tab also. There's also one other thing I noticed, when you choose Run task every 10 minutes, to the right of that, set the option to Indefinitely (or else it might quit working in 1 day).

Depending on the program, you might need to experiment with the last option on the Settings tab. Where it says "Do not start a new instance". Which program you are running every 10 minutes, and why? More info may help.

If you have it set for 10 minutes, it won't run right at startup. It will start running 10 minutes after boot. So what you should do is place it in your Startup start menu folder to run it when Windows boots. Then let the Task run it every 10 minutes afterwards.

Your Startup start menu folder can be accessed by pressing Win+R to open the Run dialog and pasting the following in:
"%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
Be sure to include the quotes. Then press OK to open the folder. Create a shortcut to the program there.