Solved

taskmanager task after Event 6008  not executing

Posted on 2013-12-01
3
664 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
  • 2
3 Comments
 
LVL 53

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now