Community forum

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


ACS
  •  ACS
  • Paid support Topic Starter
2014-04-08T23:05:52Z
I have a job that runs a client program to generate reports from it.

The first task kills any running clients.
The second generates reports by manipulating the client software.
The third looks for current files created by the previous task.

If the files are not current, I tell the job to run from the beginning, from the kill to the end again.
We get error notices on every failed attempt, which is what we want to happen.

I would like to only allow for 2 or 3 error loop so I don't end up with an infinite loop.

How can I accomplish this?

I can't use the try routine from the individual task, because number three checks for current files from number two.
Sponsor
Forum information
Support
2014-04-09T11:47:19Z
I think you need to make sure that you throw an error (through On error tab) if the count is not matching. Then you can use Flow on Job level to retry Job x times upon Job failure.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
bbusse
2014-04-09T13:21:30Z
Originally Posted by: Support 

I think you need to make sure that you throw an error (through On error tab) if the count is not matching. Then you can use Flow on Job level to retry Job x times upon Job failure.



This is perfect. I actually didn't realize there was a retry job X times option in the flow for the entire job. Thanks for pointing that out, Henrik ;-)

So yeah, your 3rd task should have a hard stop/error if it doesn't find what it needs. If it's a custom script (not a built in task) you can tell your script to exit with a specific error code and set that specific error code instead of just arbitrarily saying 'always' in the job flow. It needs to generate an error so the overall job is a failure.

Then, edit the job itself (not the tasks), go to the flow tab, and add an 'On Error'/Always 'Wait x minutes or x seconds and retry job X times' option.

Brian
Scroll to Top