locked
Tricky repeating Scheduled Task flaw in Server 2016 apparently fixed by KB4025334 RRS feed

All replies

  • Hi,

    That is a different issue.  I believe the original issue (bug) is when a scheduled task is either originally set up or is modified.  The start date is required to be in the future.  What was fixed is a problem that occurred after a reboot - not related.

    The remaining bug makes scheduled tasks VERY difficult to implement and test.  An example is probably good to illustrate:

    We have a server that has a very busy daily schedule.  We have a task that needs to begin running at 2AM and run once every 5 minutes until 10PM.  We use the task scheduler to run it.

    Before Win 2016:  Create a task with a start date of 2AM TODAY, run every 5 minutes until 10PM.  It doesn't matter what time during the day I do this, it would work.  It will begin by itself in a few minutes, so I will be able to test the "automatic launch" right away".

    With Win 2016: Create a task with 2AM TOMORROW as the begin date, to run every 5 minutes until 10PM.  If I install it at 9AM, I need to manually run it every 5 minutes from now until 10PM today/tonight, because the "automatic schedule" won't start until tomorrow in the middle of the night.  Then, after the 10PM manual start, get a couple of hours of sleep, set the alarm clock to get up and make sure it works correctly at 2AM, the first time it is automatically launched (to make sure I got everything correct in the scheduled task).

    To correct a mistake, repeat this process.  Before Win 2016, mistakes cost about 15 minutes; with Win 2016, mistakes cost about 18-24 hours or more and a lost night of sleep.

    ...It reminds me of the old story with the chicken and the pig looking at the ham and eggs breakfast...

    Thanks,
    Rob


    thanks, Rob Hutchison

    Wednesday, August 30, 2017 7:03 PM
  • This is all very confusing, but I think the Serverfault issue and the KB4025334 issue are the same. Note that the Serverfault OP specifically mentions "This is fine until you reboot," and the KB says "Stopped working after reboot." Also, a commenter there in May said that he was working with support, who told him that a patch was due in July/Aug, which is what happened.

    It's too bad what you're talking about wasn't included.

    Thursday, August 31, 2017 5:40 AM
  • Hi,

    Good news so far: 

    I just applied the patch -  Then, I was able to set a starting time in the past and the scheduled worked properly. Lastly, I rebooted the machine and it continued to work correctly.

    One caveat:  apparently, it looks like they did a "workaround" to fix it by having the task run on reboot regardless of when it should run.  It is important to note this because you should be careful to make sure that the "If the task is already running, do not start a new instance" property is set.  You might have a task that runs every two hours, runs for 3 minutes and exists, but the machine may reboot 1 minute before the schedule should normally run.  If you didn't have the above property set, you would get 2 tasks running at the same time.

    So, this is now workable with this new update - unfortunate thing is that this new update is not a normal part of Windows Update. it is VERY large (over 1G), takes a long time to run and requires a reboot afterwards.  Phew...

    Also, the patch is very hard to find for a server - the file for Windows 2016 as of 8/31/2017 is called AMD64-all-windows10.0-kb4039396-x64_bd1f9e1c7add02b8f3334f1aeaa07cae6632c3cf.msu, even for Win 2016 x64 ("AMD" and "Windows10" in the name are deceiving) - it may be easier to search for that than by starting out with the KB number - the correct file is found about 6 or 7 links past the original KB page and you need to do a lot of experimenting to find out which is the correct one when you are given a list of many that could be the correct one.

    Thanks,
    Rob


    thanks, Rob Hutchison

    Thursday, August 31, 2017 3:08 PM
  • Good to hear. What was your patch level yesterday then?

    The way updates should work is that the latest one found in WU (no manual download needed) would include what came before (i.e. it would include KB4025334). KB4034658 (14393.1593) was pushed out to WU on Aug 8, and I would have assumed that it would have contained KB4025334 (14393.1532) since it's newer.

    The entire history is here. Some are pushed out to WU, some are manual download only.

    Thursday, August 31, 2017 3:30 PM
  • Hi,

    Before I started any of this process on the Windows 2016 Server, I checked for Windows Updates and it told me that no updates were available.  In Advanced Options, I have "Give me updates for other Microsoft products..." selected.   We have all of our servers set to automatically update nightly and reboot nightly if necessary.

    As to version, I didn't capture it before the update, but one of the other 2016 machines using the same nightly Windows updates show: 14993.1593 (using winver).

    So, you're saying this patch should have been pushed out Aug 8th?  (Edited)...  What I just did was to test the task before applying the large patch file (I just verified it this other machine where winver showed 14993.1593). 

    If you create the schedule with a start date in the past, it will not launch. 

    I will apply the large file and see if it changes the behavior.


    Rob

    • Edited by visualsi Thursday, August 31, 2017 4:11 PM
    Thursday, August 31, 2017 3:54 PM
  • That's the way that it always used to be, but MS complicated updates earlier this year by trying to stagger "quality" updates and "security" updates. I was under the impression though, that the Patch Tuesday update for, say, this month (1593), included the quality updates from last month (1532).
    Thursday, August 31, 2017 4:09 PM
  • Hi,

    Update: winver had shown 14993.1593, before large patch file, I tried to create a schedule with a start date in the past (yesterday) and it would not launch.  I left it in there.  I applied the 1GB+ patch file.  It required a reboot.  After the reboot, the schedule that never worked before began to work all by itself.


    thanks, Rob Hutchison

    Thursday, August 31, 2017 5:04 PM
  • Great. :)  So it must be that there's a longer window on when older updates get rolled up than I thought, but they must get there eventually.

    Thursday, August 31, 2017 5:30 PM
  • I did have that kind of error even after the fix, i also have those event in the task scheduler event viewer:

    "Task Scheduler failed to load task "\taskname" at service startup. Additional Data: Error Value: 2147944153."

    It was all because of the service Time Broker service being disable for some unknown reason, i reactivate it by registry, rebooted and all went fine!!!

    Was beginning to become crazy over this one.... Task scheduler was working 1/3 of the time!!!!

    Thank you


    Monday, October 16, 2017 8:09 PM
  • Hi, 

    I got exactly this issue, when i try to set up a Task on Windows Server 2016 Standard.

    The Task is set up to trigger at Startup and repeat every hour. After a reboot the Task is executed once, does not repeat. The Scheduler also does not show a value for "Next Run Time".

    However, if I set the trigger daily on a specific time it works fine.

    Did you find any solution for this Problem?

    Thursday, December 5, 2019 11:57 AM
  • Sorry, I'm out of the loop on this one at this point. I thought the patch fixed it, but perhaps not, or perhaps it's a slightly different problem.
    Thursday, December 5, 2019 11:10 PM