?
Solved

taskmanager task after Event 6008  not executing

Posted on 2013-12-01
3
Medium Priority
?
685 Views
Last Modified: 2013-12-15
I've seen several post that claim that tasks, associated to a 6008 event, do not execute after a 6008 event, I have that same problem.  I've also noticed that event 6005 executes after a 6008, 6005 is "The Event log service was started".

There is also an event in the event log 7036, "The Task Scheduler service entered the running state", that occurs even after that.  

I don't see how the task in the task manager can run if the process is not even running.

So 3 questions

Is it possible to trap this 6008 event given the above, using the attach a task to an event available in the event log?

Is there a way of delaying the execution of the task attached to the event until everything is up and running

If not what is the most common method of sending notification of these types of event.

Please give examples using powershell

There is not a problem in the existing powershell logic as I have run the task successfully from the task scheduler
0
Comment
Question by:c7c4c7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 56

Expert Comment

by:McKnife
ID: 39688856
This is a known limitation of the eventlog ion connection with the task scheduler. The event gets logged before the system is ready to fire a task attached to the 6008-event.
Too bad.

That's why we use a scheduled task that gets triggered at shutdown and uses dumpel.exe to search for 6008 events and sends an email if found. It could be done using powershell, but we continued using dumpel as we have been doing this for years.

Dumpel can be found here: http://www.petri.co.il/download_free_reskit_tools.htm
0
 

Accepted Solution

by:
c7c4c7 earned 0 total points
ID: 39690444
I'm going to answer this one myself, see the attached for the code I'm going to use.  If anyone has any suggestions I'm glad to hear them.  Also the time parameter will can be adjusted.

$date = [DateTime]::Now.Subtract([TimeSpan]::FromMinutes(20))
$events=get-eventlog -logname system -after $date | where{$_.eventid -eq "6008"} | select machineName,EventID,EntryType,Message
if ($events -ne $null)
	{sendUnexpectedOutage}

Open in new window





Thanks
0
 

Author Closing Comment

by:c7c4c7
ID: 39719742
Works perfectly with a few tweaks
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question