Custom SCOM 2007 Agent Task Timeout

Hello All,

I created 2 Custom Agent Tasks to be run from the console. I increased the necessary timeout to 600 seconds however it would appear to still be timing out. I noticed in the Ops Console when you choose a server and launch the task you can override the timeout value to something greater than 600 seconds. Does this value hold true or are we still limitted to 600 seconds?

A little background - The task itself will launch an executable on the target server, once launched the .exe will do a scan for missing security updates, patches, etc. If any are detected missing it will then attempt to install referencing a .cab file on the local machine. as you can imagine the time for this all to ocurr is always greater than the max SCOM timeout.

There are 2 problems, 1 - exceeding the alotted timeout , 2 - once the timeout is exceeded SCOM kills the .exe on the machine and stops the installing of patches.

is there either a way to increase the alotted timeout greater than 600 seconds or trick SCOM and have it NOT kill the .exe once the timeout occurs.

hope this somewhat makes sense.

thanks in advance,

Matt

July 16th, 2013 8:53pm

You could try to export the MP that task is in and edit some elements in XML:

Look for the task part and find out TimeoutSeconds element inside the Task element. Just modify the Timeout value as you expect.

Roger

Free Windows Admin Tool Kit Click here and download it now
July 16th, 2013 11:35pm

Hi Roger,

appreciate your reply. I exported the pack and edited it using the Authoring Console, I set the timout value to greater than the standard 600 seconds. Unfortunately the task still timesout before once 600 seconds has elapsed.

What if I set the task to call a simple .BAT, do you think that would work?

thanks,

Matt

July 17th, 2013 12:13pm

further troubleshooting,

I got a simple VBscript that will launch my executable as needed. I went this route because the script task supposedly allows me to choose a timeout of seconds, minutes, hours, days.

I set my timeout for 2 hours and ran the task, the VBscript launched my executable on the target machine as expected. However it would seem SCOM still times out with the 600 second threshold!!!!!!

Timeout expired Error Code: -2130771868 (Unknown error (0x80ff0064)).

I ask, what is the point of having the option of going into the hours or days if it timesout after 10 minutes?

thanks,

Matt

Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 5:03pm

Hi,

SCOM can run long running jobs but as a best practice we set time as 600 sec (i.e. 10 minutes). scom agent does multiple task like discovery, monitors, rules and task...etc if there are long running jobs scom agent may be busy in running task and high usage of resources which will effect performance of server and monitoring instability due to which as a best practice do not configure long runnig task form scom.

yes you can invoke bat file  from recovery task

Regards

July 17th, 2013 10:49pm

imho using scom for these kind of jobs isn't really a good way. but i'll won't go into that :)

Maybe you can use an alternative approach if you still need to invoke this job through scom. Instead of directly running the executable from scom, just have the task create a scheduled job on the server, which will start the executable. The scom task will be quick and the executable has the time specified in the scheduled task.

If you want to alert back about this you should write 1 or more success/failure events and pick those up with scom.

 

Free Windows Admin Tool Kit Click here and download it now
July 18th, 2013 9:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics