Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

taskmanager task after Event 6008  not executing

Posted on 2013-12-01
3
Medium Priority
?
691 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 October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. 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

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
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…
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…

609 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