Windows Server 2012 - Task Scheduler Issue
-
Well, create a new task with the same settings and see if that gives the same issue.
-
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
@Pete-S said in Windows Server 2012 - Task Scheduler Issue:
Has this only happened once?
Nope. It's been happening for at least a week or so. I've finally pulled a majority of my hair out and made a post here.
There is always the possibility that it is the task scheduling service that fails or one of it's dependencies.
You could create a new task that triggers a simple script that just writes the current time in a log file.
If the task service fails to run you would know and also be able to see when.There are some settings under the service as well what the service should do if it fails. Might want to check those as well.
-
What's killing me is this only impacts some tasks. Other tasks that run as the SYSTEM account that do similar functions (execute a PowerShell script that does a SQL query and ships the result to its respective destination) are fine.
I don't know how the underlyings of the Task Scheduler work, but a WAG says that something on the back end is corrupt/broken. I dunno if there is a "rebuild" Task Scheduler sort of function.
-
@Obsolesce said in Windows Server 2012 - Task Scheduler Issue:
Well, create a new task with the same settings and see if that gives the same issue.
Yeah, I think I may just do that. Though I'd really like to know 1) what happened (?!?!), and 2) if there is a better fix than to just re-do things, heh.
-
How many tasks are we talking about?
I would probably export them, delete and import just to be certain.
And make sure task history is enabled.
-
@Pete-S said in Windows Server 2012 - Task Scheduler Issue:
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
@Pete-S said in Windows Server 2012 - Task Scheduler Issue:
Has this only happened once?
Nope. It's been happening for at least a week or so. I've finally pulled a majority of my hair out and made a post here.
There is always the possibility that it is the task scheduling service that fails or one of it's dependencies.
You could create a new task that triggers a simple script that just writes the current time in a log file.
If the task service fails to run you would know and also be able to see when.There are some settings under the service as well what the service should do if it fails. Might want to check those as well.
If the Task Scheduler service was failing, wouldn't that be written to the Event Log? If so, it's not.
-
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
@Obsolesce said in Windows Server 2012 - Task Scheduler Issue:
Well, create a new task with the same settings and see if that gives the same issue.
Yeah, I think I may just do that. Though I'd really like to know 1) what happened (?!?!), and 2) if there is a better fix than to just re-do things, heh.
Well, you could add into the script at the end, to remove the scheduled task and create it again, followed by a verification of such, and to email you if it fails.
-
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
@Pete-S said in Windows Server 2012 - Task Scheduler Issue:
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
@Pete-S said in Windows Server 2012 - Task Scheduler Issue:
Has this only happened once?
Nope. It's been happening for at least a week or so. I've finally pulled a majority of my hair out and made a post here.
There is always the possibility that it is the task scheduling service that fails or one of it's dependencies.
You could create a new task that triggers a simple script that just writes the current time in a log file.
If the task service fails to run you would know and also be able to see when.There are some settings under the service as well what the service should do if it fails. Might want to check those as well.
If the Task Scheduler service was failing, wouldn't that be written to the Event Log? If so, it's not.
Well, we are kind of assuming that we are dealing with something that has changed or is not the way it should. Either a software bug, a change made by windows updates, insufficient privileges or something of that nature.
-
@Pete-S said in Windows Server 2012 - Task Scheduler Issue:
How many tasks are we talking about?
I would probably export them, delete and import just to be certain.
And make sure task history is enabled.
Looks like at least 4 tasks are having this issue (there may be some more, I need to do another pass through the scheduled tasks). I'm going to try an export/delete/import and see what happens...
-
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
@Pete-S said in Windows Server 2012 - Task Scheduler Issue:
How many tasks are we talking about?
I would probably export them, delete and import just to be certain.
And make sure task history is enabled.
Looks like at least 4 tasks are having this issue (there may be some more, I need to do another pass through the scheduled tasks). I'm going to try an export/delete/import and see what happens...
Don't import the old task. Create it new. Just set the same options, but new start date.
-
Wow, so I just went through all the scheduled tasks on this box.
There are 41 tasks total. Out of the 41, there are 13 that are in this weird "ignored" condition. Bleh. This is going to be fun re-creating these.
-
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
Wow, so I just went through all the scheduled tasks on this box.
There are 41 tasks total. Out of the 41, there are 13 that are in this weird "ignored" condition. Bleh. This is going to be fun re-creating these.
Perhaps export them all - then find out how to re-create them using powershell. Then you'll have a backup for them incase you need to migrate this to another server, etc for the future.
-
@Dashrender said in Windows Server 2012 - Task Scheduler Issue:
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
Wow, so I just went through all the scheduled tasks on this box.
There are 41 tasks total. Out of the 41, there are 13 that are in this weird "ignored" condition. Bleh. This is going to be fun re-creating these.
Perhaps export them all - then find out how to re-create them using powershell. Then you'll have a backup for them incase you need to migrate this to another server, etc for the future.
Not a bad idea.
-
@Obsolesce said in Windows Server 2012 - Task Scheduler Issue:
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
@Pete-S said in Windows Server 2012 - Task Scheduler Issue:
How many tasks are we talking about?
I would probably export them, delete and import just to be certain.
And make sure task history is enabled.
Looks like at least 4 tasks are having this issue (there may be some more, I need to do another pass through the scheduled tasks). I'm going to try an export/delete/import and see what happens...
Don't import the old task. Create it new. Just set the same options, but new start date.
Makes no sense. They will be exactly the same regardless. If you want another start date (which makes no difference) just change it in the xml.
-
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
@Dashrender said in Windows Server 2012 - Task Scheduler Issue:
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
Wow, so I just went through all the scheduled tasks on this box.
There are 41 tasks total. Out of the 41, there are 13 that are in this weird "ignored" condition. Bleh. This is going to be fun re-creating these.
Perhaps export them all - then find out how to re-create them using powershell. Then you'll have a backup for them incase you need to migrate this to another server, etc for the future.
Not a bad idea.
You could write a simple function for a script to recreate them all based on the exported XMLs.
-
This is how you create tasks from the xml files with powershell.
-
So, I ended up just re-creating the jobs manually. It wasn't nearly as cumbersome as I had imagined. I'd export the job and use the XML as reference.
Things seemed good, until Friday (1/31). Some of the jobs I re-created did not run that night. They have subsequently ran successfully though...just "skipped" Friday even though they're scheduled to run that day of the week (Monday - Friday)...so what the heck?!
I've been meaning to move these jobs to another box, but it's been low priority. I guess this is a sign that I should do that....
-
@anthonyh maybe schedule something else to log pings to that device when those tasks are supposed tobrun. Maybe it's taking a nap or something at that time. No idea, never seen that before, lots of variables.
-
@anthonyh said in Windows Server 2012 - Task Scheduler Issue:
So, I ended up just re-creating the jobs manually. It wasn't nearly as cumbersome as I had imagined. I'd export the job and use the XML as reference.
Things seemed good, until Friday (1/31). Some of the jobs I re-created did not run that night. They have subsequently ran successfully though...just "skipped" Friday even though they're scheduled to run that day of the week (Monday - Friday)...so what the heck?!
I've been meaning to move these jobs to another box, but it's been low priority. I guess this is a sign that I should do that....
Do you have backup jobs or VSS running at the same time? Could be a stun.
-
@Obsolesce said in Windows Server 2012 - Task Scheduler Issue:
@anthonyh maybe schedule something else to log pings to that device when those tasks are supposed tobrun. Maybe it's taking a nap or something at that time. No idea, never seen that before, lots of variables.
These jobs, unfortunately, run queries against a SQL database that's local to the box.
It's definitely weird.