Assuming that are working with the 24x7 Windows version you can chnage the job type to asynchrnous JAL script and in the script code the following Dim process_id, number RunAndWait "c:\\mybatch.bat", "", 7200, process_id In the job properties enable notification action "on error", select email or other action type and complete the rest of properties. Thats'it. Similar method is available with VBScript job types. For example Dim vb24x7 Set vb24x7 = CreateObject("vb24x7.Process") ProcessId = vb24x7.RunAndWait("c:\mybatch.bat", 7200) If ProcessId < 0 Then 'handle the notification here or failed the job and let 24x7 do the rest Err.Raise 1001, "my job", "Timeout error message" End If Set vb24x7 = Nothing : I'm evaluating schedulars now and came across 24x7 and have a couple of : questsions : the help file says: Asynchronous Process : For program and document file jobs: The 24x7 Scheduler executes the specified : program asynchronously in background using a separate job thread, and : keeps monitoring the running program (process) until it is complete or the : time-out interval elapses. : but in step 3 of the Job Wizzard if I check Asyncronous the timeout box is : dissabled : So if I have a job to run asyncronously and I want to consider that if it has : been executing for 2 hours and not completed it is hung I I should fail : the job and notify someone, what do I do?
|