Solved

taskmanager task after Event 6008  not executing

Posted on 2013-12-01
3
681 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 55

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Synchronize a new Active Directory domain with an existing Office 365 tenant
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
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). …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

729 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