Killing a Runaway Job
JAMS makes it easy to kill a Runaway Job process through the use of a Notification Job.
Simply create a Job, called KillRunaway in this example, using the PowerShell Execution Method with the following Source:
param($JAMS_NOTIFY_JAMS_ENTRY, $JAMS_NOTIFY_REASON)
if ($JAMS_NOTIFY_REASON -eq
'RUNAWAY'
)
{
write-host
"Killing runaway entry $JAMS_NOTIFY_JAMS_ENTRY"
Add-PSSnapin MVPSI.JAMS -erroraction SilentlyCOntinue
Stop-JAMSEntry $JAMS_NOTIFY_JAMS_ENTRY -confirm:$false
}
More information on JAMS_NOTIFY_REASON:
The reason for the notifications. This parameter could be: COMPLETED, FAILED, SHORT, RUNAWAY, STALLED or MISSED_WINDOW.
http://www.mvpsi.com/doc/JAMSClient/NotificationParameters.html
Posted Tuesday, July 28, 2009
by
DanielS
http://www.jamssupport.com/KnowledgebaseArticle50043.aspx