How can I add Repeat task every "4 hours" to task scheduler?

Fluid Poetry 0 Reputation points
2023-04-29T17:17:20.2866667+00:00

I'm running Win11Pro.

Is there a registry hack or editing some system file which would allow me to set up tasks in the Task Scheduler such that in the advanced Trigger settings I could set this task to recur every 4 hours? I would add it could be extended to any number which would divide evenly into 24, such as 2, 4, 3, 6, 12, but I'm just looking for 4 or 6 hour options.

I believe Windows used to have no problem with manually changing the "1 hour" setting to x hours in the field, but currently it will not run on it's schedule if I do this.

The only option to get around this is inelegant, that is by adding multiple triggers at 4 hour intervals.

I am hoping to add via registry some extra recurrence time options.

I'm also going to post this in the answers.microsoft.com site, since I'm unsure if this or the other location is the best place to ask this question.

thank you for your time.

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,173 questions
{count} votes

3 answers

Sort by: Most helpful
  1. MotoX80 35,626 Reputation points
    2023-05-01T15:40:14.54+00:00

    It appears to be working ok for me. I set the task to run at 11:30 and repeat every 4 hours.

    User's image

    Note the last run time and that the next run time is correctly set. Obviously, I'll need to wait 4 hours to verify that it executes.

    Is your next run time getting set?

    User's image

    0 comments No comments

  2. Limitless Technology 44,671 Reputation points
    2023-05-02T11:45:22.8866667+00:00

    Hello there,

    You should be able to update the value if you by editing the GPO XML File. Please follow below process to do that:

    1. Create a Group Policy (GPO) with GPO Settings for Task Scheduler by going to either:

    Computer Configuration -> Preferences -> Control Panel Settings -> Scheduled Tasks OR

    User Configuration -> Preferences -> Control Panel Settings -> Schedule Tasks

    1. Once the GPO is created - Click the GPO and On Right Hand Side Pane Click Details Tab to get the Unique ID of the GPO. Keep a note of this somewhere.
    2. On your domain controller go to c:\windows\sysvol\domain\Policies\ <Search for the Unique ID of the GPO> and open the folder
    3. Go to Machine or User depending upon where you have created the policy and then Preferences\ScheduledTasks\ScheduledTasks.xml.
    4. Open the XML file and Edit the Time according to your requirement and SAVE. The XML Tag Value to update is in below section:

    -<Triggers>-<TimeTrigger><StartBoundary>2019-10-31T14:03:16</StartBoundary><Enabled>true</Enabled>-<Repetition><Interval>PT1H</Interval><StopAtDurationEnd>false</StopAtDurationEnd></Repetition></TimeTrigger> </Triggers></Task></Properties>

    Update PT1H to PT4H to change it to 4 Hours.

    https://social.technet.microsoft.com/Forums/en-US/53fd55e9-1af1-4157-b622-1e2f7eb5167a/creating-a-scheduled-task-that-runs-every-4-hours?forum=winserverGP

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments

  3. Ryan B Cooley 41 Reputation points
    2024-01-24T19:11:15.3366667+00:00

    It depends on when you want it to run. Daily is every day. Weekly gives you the option of choosing the days. Monthly lets you choose specific days. If you check the box that says "Repeat task every:", you can choose 1 hour, 30 minutes, 15 minutes, 10 minutes, or 5 minutes; or you can also manually change the values in the drop-down box to 4 hours or 8 hours or 2 hours or 1.5 hours, etc. just by typing the numbers in.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.