Run a task every x-minutes with Windows Task Scheduler

WindowsScheduled Tasks

Windows Problem Overview


I'm trying to get Windows Task Scheduler to run a particular .exe every 10 minutes or so, but the options only allow for once a day execution.

Is there a way I can get it to run a .exe every 10 or 20 minutes?

Windows Solutions


Solution 1 - Windows

The task must be configured in two steps.

First you create a simple task that start at 0:00, every day. Then, you go in Advanced... (or similar depending on the operating system you are on) and select the Repeat every X minutes option for 24 hours.

The key here is to find the advanced properties. If you are using the XP wizard, it will only offer you to launch the advanced dialog once you created the task.

On more recent versions of Windows (7+ I think?):

  1. Double click the task and a property window will show up.
  2. Click the Triggers tab.
  3. Double click the trigger details and the Edit Trigger window will show up.
  4. Under Advanced settings panel, tick Repeat task every xxx minutes, and set Indefinitely if you need.
  5. Finally, click ok.

Solution 2 - Windows

After you select the minimum repeat option (5 minutes or 10 minutes) you can highlight the number and write whatever number you want

Solution 3 - Windows

You can also create a batch file like the following if you need finer granularity between calls:

:loop
call YourScript.Exe
timeout /t timeToWaitBetweenCallsInSeconds /nobreak
goto :loop

Solution 4 - Windows

Hourly task example

While taking the advice above with schtasks, you can see in the UI what must be done to perform an hourly task. When you edit trigger begin the task on a schedule, One Time (this is the key). Then you can select "Repeat task every:" 1 hour or whatever you wish. See screenshot:

Solution 5 - Windows

In the "Repeat Task every:" just type 2 minutes instead of choosing from the dropdown list.

Solution 6 - Windows

On XP, I clicked the Advanced button on the Schedule tab. There is a checkbox for Repeat task. The default is every 10 minutes.

Additionally, you can create scheduled task via the command line. I haven't tried this myself, but it looks like you'd want something along the lines of (not tested):

schtasks /create /tn "Some task name" /tr "app.exe" /sc HOURLY 

Solution 7 - Windows

To schedule the update to be automatic you should:

  • Go to Control Panel » Administrative Tools » Scheduled Tasks
  • Create the (basic) task
  • Go to Schedule » Advanced
  • Check the box for "Repeat Task" every 10 minutes with a duration of, e.g. 24 hours or Indefinitely
  • Leave End Date unchecked

If you cannot find the Schedule settings, look under: Properties, Edit, Triggers.

Solution 8 - Windows

Some of the links provided are only settings for Windows 2003's version of "Scheduled Tasks"

In Windows Server 2008 the "Tasks" setup only has a

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionkacalapyView Question on Stackoverflow
Solution 1 - WindowsCoincoinView Answer on Stackoverflow
Solution 2 - WindowsDurim SinaniView Answer on Stackoverflow
Solution 3 - WindowsKevin LeeView Answer on Stackoverflow
Solution 4 - WindowsMike CushView Answer on Stackoverflow
Solution 5 - WindowsHenrikView Answer on Stackoverflow
Solution 6 - WindowsCourtney ChristensenView Answer on Stackoverflow
Solution 7 - WindowsDavidView Answer on Stackoverflow
Solution 8 - WindowsMorningZView Answer on Stackoverflow