Scheduled tasks run fine at first then stop running

This has been an ongoing issue with every Server 2012 machine that we have running tasks (a buddy of mine has the same issue with 2008 R2).  At first the task will run fine as it should but then out of the blue it will simply stop running.  The last run time could be months ago and the next run time will be the normal scheduled time to run.  Last run result is always 0x0.  There is also nothing in the history tab as I assume it's been too long ago since the last time it ran.

I can't figure out what's keeping these tasks from properly triggering and running.  Now before anyone starts going down a list of settings I should check that I might have goofed up, remember, these run fine at first and which jobs stop running properly are completely random.  Also, some of these tasks are Microsoft generated tasks like Windows Backup:

This happens on MS tasks as well as my own tasks that run fine at first but then just stop.  The only fix on a per task basis that I've been able to come up with is to delete the job and create it from scratch where it will then work forever or get stuck.  It's completely random.

I would greatly appreciate any help on this matter as it's driving me absolutely nuts.

September 13th, 2013 5:17pm

Hi,

In order to solve the problem more efficiently I need to clarify some information.

Are there any errors about the scheduled tasks?

Here are some links below that could be helpful to you:

Troubleshooting Task Scheduler

http://technet.microsoft.com/en-us/library/cc721846.aspx

Scheduled task not running on Windows Server 2008 but working on Windows XP

http://social.technet.microsoft.com/Forums/windowsserver/en-US/46a867a0-8432-4b90-abe3-9a5661d1b276/scheduled-task-not-running-on-windows-server-2008-but-working-on-windows-xp

Task Scheduler did not run on the planned time. (Windows Server 2008 SP2)

http://social.technet.microsoft.com/Forums/windowsserver/en-US/d817535a-0210-47e9-a0fe-3c6dbf38b777/task-scheduler-did-not-run-on-the-planned-time-windows-server-2008-sp2

scheduled task not work good on windows server 2008

http://social.technet.microsoft.com/Forums/windowsserver/en-US/f7baffb3-be5e-4d2d-953d-160e258089e9/scheduled-task-not-work-good-on-windows-server-2008

Use the Windows Server 2012 Essentials Log Collector

http://technet.microsoft.com/en-us/library/jj206706.aspx

Best Regards,

Amy Wang
Free Windows Admin Tool Kit Click here and download it now
September 17th, 2013 6:09am

As I mentioned the history tab for the tasks are always blank.  No errors are ever thrown.  Unfortunately none of the links you provided shed any light on this issue.

Thanks though Amy!

September 24th, 2013 7:24pm

Hi,

I feel so sorry that my suggestions were not helpful.

It seems like the Task Scheduler Service is running well, since every time you create a new one, the new task will run perfectly for a while.

Just to make sure, would you please check if the Task Scheduler Service is running when the next time tasks stop running?

To check if the service is running, please do the following steps:

  1. Open Control Panel.
  2. Click on System and Maintenance, select Administrative Tools.
  3. Click on Services, then find Task Scheduler service.

Also, please check if there are any related errors in system logs by running eventvwr command in the command prompt.

The system logs are under Windows Logs.

For more information about this, please refer to the following links:

Troubleshooting Task Scheduler

http://technet.microsoft.com/en-us/library/cc721846.aspx

"Task triggered on scheduler" event is not happening and scheduled task is not running

http://social.technet.microsoft.com/Forums/windowsserver/en-US/31349b83-c87d-425c-9059-eae7192fb850/task-triggered-on-scheduler-event-is-not-happening-and-scheduled-task-is-not-running

Have a nice day!

Best Regards,

Amy Wang
Free Windows Admin Tool Kit Click here and download it now
September 25th, 2013 8:37am

The image above is a job that currently is not working.  Every day it gets updated to run the next following schedule.  I purposely left it broken while I try to find a solution.  The Task Scheduler Service is running and there is nothing in the app or sys log.
September 27th, 2013 12:08am

Do you happen to configure the Expire setting on the trigger settings? Please open the Task Scheduler, open the scheduled task, highlight the trigger, see if the check box of Expire and the check box of Stop task if runs longer than are selected, you should uncheck these settings.

Meanwhile I provide the following articles for your reference:

http://technet.microsoft.com/en-us/library/cc766428.aspx - Task Scheduler How To...

http://social.technet.microsoft.com/Forums/windowsserver/en-US/e0cc36f4-3b26-4c52-824d-8e2a29ca3abb/daily-scheduled-tasks-stop-running-after-a-few-days - Daily Scheduled Tasks Stop Running After a Few Days

Free Windows Admin Tool Kit Click here and download it now
October 1st, 2013 8:37am

Those are not checked.  However, I never touch any task that Windows itself creates like the Windows Backup Tasks.
October 1st, 2013 4:28pm

Please compare the following two registry path, ensure that the GUIDs under Tasks key matches the GUID under Plain key:

 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks

 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Plain

 

Try to delete the GUIDs under the Plain key that doesnt match under Tasks key, and restart the server.

 

Please note:pay attention to back up the registry before deleting any items.

Free Windows Admin Tool Kit Click here and download it now
October 11th, 2013 4:20am

Those all match.
October 29th, 2013 5:40pm

Back to unmark as answer when there is no answer.  Please stop doing that Amy Wang.

Now I understand how I come across "answers" on various topics that are bogus and never actually answer anything at all.

Free Windows Admin Tool Kit Click here and download it now
December 11th, 2013 10:51pm

Hi there JEmlay,

I hope I'm not adding to your frustration, but the instant I saw this thread I thought the same thing as Amy, however she failed to ask if your had unchecked the checkmark in the trigger settings for "Stop the task if it runs for longer than"... which is always on by default, not sure if that would cause the issue.

It's almost as if windows is meant to be restarted every three days because it stops operating properly... hmm.... No settings like that in Linux...

Conspiracy theory aside, let me know if that's the issue. It's probably not, but it doesn't hurt to check.

I thought this because your screenshot shows 2 days exactly, elapsing between start and end. Chances of that being a crash or other seem slim to me.

Hope that helps!

Cheers,

Shawn.


  • Edited by Moddin Man Sunday, March 09, 2014 10:08 PM
March 9th, 2014 10:07pm

Thanks for the reply Shawn!  I've played with that setting in the past and it didn't help.  When these backup jobs trigger they only last for a few seconds as they execute a PS command.  The backup job process runs for a while (of course) but the task itself finishes right away.

Not sure what 2 days you're referring too?  The last runtime and next runtime are 2 months apart.

As you can see the job shows a status of READY.  But then at 9/13 @ 6pm it just updates itself to 9/14 @ 6pm....never actually triggering.  Now if I run it manually it runs fine and then continues to run fine until it gets hosed up again.  Makes no sense at all.

Free Windows Admin Tool Kit Click here and download it now
April 24th, 2014 5:23pm

Hi,

Even i am facing this issue with the windows server.
The only Solution got to this issue is to restart the server..

:(
After the the restart my Tasks works fine for few days then the issue continues "Last Run Time" never changes "Next Run Time" Gets updated every Day.

Its a Bug in the OS. 

April 30th, 2014 5:31am

I pretty much figured at this point it's just a bug.  One that MS doesn't want to recognize.

However, if you don't want to restart your server (or can't) you can just run the job manually and it should work for a while after that.

Free Windows Admin Tool Kit Click here and download it now
August 7th, 2014 12:26am

I have the same issue. It looks like it has been an issue in Windows for a long time:

https://social.technet.microsoft.com/Forums/windowsserver/en-US/7c29e78d-9acc-485e-aaa5-9cc73b94c3b4/task-scheduler-stops-running-scheduled-tasks-does-not-toss-error?forum=winserverManagement

http://serverfault.com/questions/399991/windows-task-scheduler-does-not-start-task-at-next-run-time

This is very, very, very poor. Being able to 100% rely on Scheduled Tasks to start when they should, at least if the OS and the task engine is running, is obviously absolutely central to using them at all.


April 3rd, 2015 8:20am

I have the same issue in Server 2008.

The most common culprit cited in web posts is Automatic Windows Update.  Some (non-security) updates seem to disable the Task Scheduler until after a reboot.  The most common successful cure is to turn off Automatic Windows Update.  Of course, most users are not happy about that.

Another common problem is that a "Start In" path is not only required, but for reliable operation, "run whether user is logged in or not" also requires that the "Start In" path be enclosed in double quotes if the path string contains any spaces.

Windows Live sometimes trips up the Task Scheduler.  This is remedied by disabling the scheduled task, SOXE.

It is, of course, not feasible to simply reboot the server any time the Task Scheduler stops working.  So, a way to restart the Task Scheduler without a reboot has been developed.  https://download.sysinternals.com/files/PSTools.zip includes the executable, psexec.exe.  It is like a telnet emulator that creates a CMD window without some of the restrictions of a user, or even administrator login.  For example, the Restart choice is normally grayed out so that even administrators cannot choose it for the Task Scheduler service.  But, you can run psexec.exe in an elevated command prompt:

>psexec.exe -i -s -h %systemroot%\system32\cmd.exe

This creates another CMD window.  In that window, you can start the services management GUI:

>services.msc

When the GUI comes up, you can scroll down to the Task Scheduler service and select it.  Then, using RMB or the Actions pulldown, the Restart choice will be available.  That will restart the Scheduler without rebooting.  And then, tasks will start running again (at least until the next Automatic Windows Update).


  • Edited by phil.morris Thursday, August 13, 2015 8:36 PM correction
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2015 8:28pm

I'm going to necro this thread because I cannot find ANY and I mean ANY solution to this mess other than to downgrade the effing OS.

Here's the kicker for me. I have this exact problem not only on server 2008 but also on DOZENS of Windows 7 and 8 workstations. I never had it when we were on XP and server 2003. On XP, when tasks failed, it was usually a credential or destination error. Since migrating to 7, tasks will just stop running out of the blue whether automatic updates are turned on or off. Manually running them works fine as expected and will even run fine for a few days and then just stop again. I just had a Windows 8.1 workstation do this. How is Microsoft not aware of this? They must be running tens of thousands of workstations and servers. If my hunch is correct, Windows 10 will exhibit the same problem. MARK MY WORDS.

August 27th, 2015 1:07am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics