Question

  • Creator
    Topic
  • #4078444

    How can I add Repeat task every “4 hours” to Task Scheduler?

    Locked

    by fluidpoetry ·

    I’m running Win11Pro.

    Is there a registry hack or editing some system file/policy 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 longest time interval provided is 1 hour, and after that 1 day.

    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 have also posted this on two microsoft sites (learn & answers .microsoft.com), since I’m unsure if this or the other location is the best place to ask this question.

    thank you for your time.

All Answers

  • Author
    Replies
    • #4078446
      Avatar photo

      Re: Task Scheduler

      by kees_b ·

      In reply to How can I add Repeat task every “4 hours” to Task Scheduler?

      You might find it “inelegant”, but it seems easy and effective to set 6 triggers for the same task, such as for example:
      – every day at 02:00
      – every day at 06:00
      – every day at 10:00
      – every day at 14:00
      – every day at 18:00
      – every day at 22:00

      But if you want to do it a more difficult way, go ahead.

    • #4078580
      Avatar photo

      Let’s ask an AI (ChatGPT.)

      by rproffitt ·

      In reply to How can I add Repeat task every “4 hours” to Task Scheduler?

      This is the answer it gave:

      You can schedule a task to run every 4 hours on Windows 11 using the Task Scheduler. Here’s how:

      1. Open the Start menu and search for “Task Scheduler”, then open it.

      2. Click on the “Create Task” option in the right-hand panel.

      3. In the “General” tab, give the task a name and description.

      4. In the “Triggers” tab, click “New” to create a new trigger.

      5. In the “New Trigger” window, select “On a schedule” and set the frequency to “Every 4 hours”. You can also set the start time and date for the task to begin.

      6. In the “Actions” tab, click “New” to create a new action.

      7. In the “New Action” window, select “Start a program” and enter the path to the program or script you want to run every 4 hours.

      8. Click “OK” to save the task.

      Your task is now scheduled to run every 4 hours. You can view and manage your scheduled tasks in the Task Scheduler library.

      • #4078833
        Avatar photo

        Reply To: How can I add Repeat task every “4 hours” to Task Scheduler?

        by kees_b ·

        In reply to Let’s ask an AI (ChatGPT.)

        I’m afraid the OP is right when he wrote it used to be possible, but I tried what ChatGPT said, and there currently (on Windows 10, at least) is no such option (any more?). It fails at step 5, where the only options are “once”, “daily”, “weekly” and “monthly”.

        ChatGPT obviously didn’t check.

        • This reply was modified 1 year, 9 months ago by Avatar photokees_b.
        • This reply was modified 1 year, 8 months ago by Avatar photokees_b.
    • #4079049
      Avatar photo
    • #4079398

      Reply To: How can I add Repeat task every “4 hours” to Task Scheduler?

      by safaq4978 ·

      In reply to How can I add Repeat task every “4 hours” to Task Scheduler?

      Hey

      To add a repeat task every “4 hours” to Task Scheduler, follow these steps:

      Open Task Scheduler by pressing the Windows key + R on your keyboard, typing “taskschd.msc” into the Run dialog box, and hitting Enter.

      In the Task Scheduler window, click on “Create Basic Task” in the right-hand sidebar.

      Follow the prompts to name your task and set the trigger to “Daily.” Choose the time you want the task to start, and set the recurrence to every “1” days.

      Next, choose “Start a Program” as the action for the task. Browse for the program you want to run, and click “Next.”

      On the “Finish” screen, make sure the box is checked next to “Open the Properties dialog for this task when I click Finish.” Click “Finish” to create the task.

      In the Properties dialog box, go to the “Triggers” tab and select the trigger you just created. Click “Edit” to modify the trigger.

      In the Edit Trigger dialog box, set the “Recur every” dropdown to “4 hours.” Click “OK” to save the changes.

      Finally, click “OK” in the Properties dialog box to save the task. The task will now run every 4 hours according to the schedule you set.

    • #4286103

      Can you elaborate. This is normally not a problem in either Win10 or Win11

      by beninu ·

      In reply to How can I add Repeat task every “4 hours” to Task Scheduler?

      I’m not entirely sure what difficulties you meet. Is your problem that the field is grayed out so you cannot write in the field like demonstrated by MotoX80 below? Or is your problem that you aren’t satisfied with the predefined suggestions from windows as selectable by the pull-down menu? I think the reason Windows hasn’t made the long pull down with a list of each 15 minutes, is that a task is made so rarely that it shouldn’t be a huge problem just writing 4 in the field when 4 is not one of the default options. But as said, I’m not sure why you cannot just write 4 in the field as you should be able to. I just tested and I can write both integers and h[:mm] format (such as 4, 2:30, 3:17, 14:00). So could you elaborate briefly and explain what the problem is when you try to write 4:00 in the field as you mentioned in your question. I’m not sure what happens when you do that, and that would clarify what the problem is.

      What do you mean you have to create multiple triggers at 4 hour intervals? Is that related to the problem that you cannot write “4:00” in the field (the field is locked/inaccessible)?

      Why would you want more recurrence rime options via RegDB? Is what bothers you that you cannot set all intervals with mouse selection but has to write them manually, as that is not really a flaw but by design?

      kees_b said: no such option (any more?). It fails at step 5, where the only options are “once”, “daily”, “weekly” and “monthly”, but I’m afraid that’s wrong and due to a confusion of recurrance and repetition (under advanced). What you want is the REPEAT every 4 hours function, not a 4 hour recurrence (the TOP field four RADIO-BUTTOINS (valued “Once, Daily, Weekly, Monthly”). The right field is the one you are talking about in advanced settings where it says “Repeat task every: …”, with a pull-down giving you the default values: 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour. But this is a combo-pull-down and not just a pull-down. So why don’t you just write your own value in the field? I have some where it says “3 hours”, others saying “45 minutes”. You can write anything you what in the field and therefore also “4 hours”. You can check the XML file generated by the task scheduler to see that your entry is registered correct. You can also change the options directly in the XML btw.

      Thanks,
      Beninu Andersen

Viewing 4 reply threads