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


JohnGreene
2016-08-31T12:17:26Z
Very simple "List File(s)" task ...but when it returns zero files, I want the job to end.
The only way I can see to do this is to set Error when returns zero.
But with my logging and reports on VC activity, this is not really an error ... I just want the job to stop without an error.

Is there a way to do this ?

Thanks, John
Sponsor
Forum information
Support
2016-08-31T13:21:26Z
You can just compare the value of files found with 0 and if it is that stop Job. You do this On success in the Flow tab of the Task.

Compare with Variable:
{TASK(Active,Result.NoFiles)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
JohnGreene
2016-08-31T18:40:14Z
Thanks ... good idea. It turns out, you need two "On Success" comparisons

On success, check other value 0 to be equal to {TASK(Active,Result.NoFiles)} and STOP Job.
On success, check other value 0 to be NOT equal to {TASK(Active,Result.NoFiles)} and Continue Job.

This works as one would expect and it is exactly what I needed.

Support
2016-09-01T07:17:11Z
Yes, correct, thanks for the update!
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
thordw
2016-09-02T13:27:06Z
Hi !
Wouldn't just be easier to just uncheck "No file(s) found" in the List files task
and create a standard condition that check's if previous output is empty, if yes then exit job otherwise continue?

That condition can then be used for several jobs 😎 .
Scroll to Top