Sometimes you may want run a complex process. In the process you may need select different direction that based on some conditions.
We’ve discussed that how to use ‘link’ fulfill these request: Auto IT: with System Center Orchestrator-Link
Suppose that I need to monitor the iexplore.exe running on the machine. I’ll check the process exist or not every 10 seconds. If the check failure over 2 times in 1 minute, system will record a event log and send a notification mail to me.
The pseudo-code is shown below:
Do While every 1 min; If GetProcessStatus(iexplore.exe)=False Then Begin If ReadCounter=2 Then If Schedule.Date=Sunday Then Couter.Reset Else Begin SentEventLogMessage; SendEmail; Counter.Reset; End; End; Else Counter=Counter+1; End; End;
At first you need a counter to count the errors. And a schedule to limit the time cycle. Just right click on “Schedules” or “Counters” in the MMC tree.
I’ve placed these activities on the SCO designer:
The Activities named ‘Modify Task Counter’ and ‘Check Schedule’ are used to determine the conditions. So I’ll show the Links properties below.
You can find the settings of the Links via click the photos.
The “Modify Task Counter” use link “(3)” and “(6)” to determine the process monitor error over threshold.
The “Send Event Log Message” use link “(4)” and “(5)” to execute both “Send Mail” and “Modify Counter”.
BTW, may be you notice that the link “(7)” is shown as dotted line. Just because the link is ‘disabled’.