3

Windows Server Version : 2016

Problem Description :

This is indeed a weird problem I am facing. I have a .bat file that I have scheduled to run every 15 min but it does not start on its own at the scheduled time if I disable and re-enable it. But the moment I update the job (any parameter) it just works fine. But if I disable it and re-enable it again it won't kick start.

There is no problem with the .bat file as it just runs fine when I manually start the job from task scheduler or from the command line.

I have tried following things:

  • Give full permissions to .bat file connected folders
  • 'Run with highest priority' selected
  • Change user to system & administrator
  • 'Run whether user is logged on' selected. I cannot have the other option
  • 'Configure for' = 'Windows Vista, Windows Server 2008' & 'Windows Server 2016'
  • Tried 'Start in' option
  • Power settings in Conditions tab (all combination) Selected 'Run task' as soon as possible after a scheduled start is missed'
  • Also restarting windows after creating the job (as suggested in some forums)

I am pretty confident that the job setup is fine as I have been using this job for past many years and recently migrated to a new server. This disabling of job is doing something which I am unable to figure out. I am sure some of you have encountered this problem and I am not alone. Any help or clues appreciated. Thanks in advance.

5
  • 1
    How did you migrate the scheduled task?
    – Davidw
    Dec 2, 2017 at 6:16
  • I created a fresh task.
    – Drake
    Dec 2, 2017 at 6:46
  • same for windows server 2019
    – stevec
    Jul 11, 2019 at 1:39
  • 1
    You need to set the start date to future. If you do that your job will run as per the set schedule. Also, note that some times when you change the job settings it will stop running automatically. If that happens you again need to set the start date to future. It is bug in windows servers. Hope this is helpful
    – Drake
    Jul 14, 2019 at 10:00
  • @Drake - This was the issue! Not sure why this is still not fixed. Faced this with even Windows Datacenter 2019! Dec 17, 2021 at 10:31

1 Answer 1

2

This highlights the difference in behavior between a “Daily” task and a “One time” task. This is a bit counterintuitive, but if you want to be able to disable a task, then have it start firing automatically again right after you re-enable it, you need to make it a “One time” task rather than “Daily.”

Here is how they look in the task list (deliberately named to highlight the schedule differences):

List of tasks

When a Daily task is disabled and re-enabled, it will resume at its Start time (so, later that day or the next day):

Daily task

If a One time task is disabled and re-enabled, it will resume as soon as one more repeat interval elapses, relative to its Start time.

One time task

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .