Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


ianclark
2008-05-07T08:10:28Z
Hi,

I'm trying to achieve a loop based on previous program's (exec task) exit code, with a built in timeout. E.g. "countusersondatabase.exe" will return exit code of 0 for no users or exit code >0 = users. If users>0 then warn users of shutdown, repeat the exec until users=0 or minutes elapsed >=10.

Is this possible ?

Thanks

Ian
Sponsor
Forum information
Support
2008-05-09T18:29:46Z
It is easy to check the exit code by using a Condition. You should create one Job. Perhaps run it every minute with a normal time trigger. Add your Execute task. Add a dummy wait task with 0 seconds of waiting. Add a Condition set to the dummy task and check the exit code of the first task. If exit code is not 0 in then set the Condition to retry the first task.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top