Many workflows in your management pack may run scripts. Because there are often hundreds of workflows running at any given time in Operations Manager from many different sources, it is important to ensure that script timeouts are not so short that there is a possibility that the script will never execute. The best practice is that script timeouts be atleast300 seconds.
Through your script not take very long to run in an MP test environment, keep in mind that in an actual customer environment, there are hundreds of workflows running at any given time in Operations Manager. As a result, the script could take longer to execute on a customer environment than it would on a test environment. It is recommended that the timeout be sufficiently high so that valid scripts do not timeout due to performance in a customer environment.
Using XML:
<
Discovery
ID
=
"
Microsoft.Windows.Server.2008.Computer.Discovery"
Enabled
="
onEssentialMonitoring"
Target
="
Windows!Microsoft.Windows.Server.Computer"
>
<
Category
>
Discovery
</
Category
>
<
DataSource
ID
=
"
DS"
TypeID
="
Microsoft.Windows.Server.2008.Discovery.DataSource"
>
<
IntervalSeconds
>
86400
</
IntervalSeconds
>
<
TimeoutSeconds
>
360
</
TimeoutSeconds
>
<
SourceId
>
$MPElement$
</
SourceId
>
</
DataSource
>
</ Discovery >