Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Windows Task Scheduler

I need a windows task scheduler that will run an exe every 5 minutes between 7am and 11pm EST
Avatar of J0rtIT
J0rtIT
Flag of Venezuela, Bolivarian Republic of image

Hi there,
You can use a trigger that runs 5 minutes, but there's no option between 2 times (7am to 11pm).
I mean you can use a trigger that runs every 5 minutes, but you can't specify the 7am to 11pm...

What I can think about is to run secondary task,
one a 6.55am to enable the tasks:
https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/enable-scheduledtask?view=win10-ps

and another tasks at 11.05pm to disable the task.
https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/disable-scheduledtask?view=win10-ps

Those works for win10, 2k16.

For 2008 R2
http://blog.powershell.no/2012/05/28/working-with-scheduled-tasks-from-windows-powershell/
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?):

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

https://stackoverflow.com/questions/4249542/run-a-task-every-x-minutes-with-windows-task-scheduler
ASKER CERTIFIED SOLUTION
Avatar of Hello There
Hello There

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hello There
Hello There

11pm not 11am... sorry.
Avatar of Larry Brister

ASKER

That'll do it guys

Thanks