Solved

taskmanager task after Event 6008  not executing

Posted on 2013-12-01
3
678 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 54

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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

733 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