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.


chrishy
2008-09-16T04:55:34Z
Hi

I have a task that copies files from a file directory location on one server to another server and location across our network using credentials.

The problem I have is even where the files are not found the task returns a success result.

Now this just aint good I say to myself and wonder how do I check for the existance of the files first then set off another task based on the existance or not of the required files?

I don't want to use multiple jobs preferring to use multiple tasks. Although I could do this using a batch file I would again prefer to utilise the standard VCron features.

Any suggestions?

The results of my output are
StdOut


StdErr


Exit Code
0

Exit Code Description
The operation completed successfully.

Status
Waiting

Result
Success
Chris Hyett
Development Team Leader
Datamail New Zealand Limited
Sponsor
Forum information
ErikC
2008-09-16T09:01:57Z
Can't this be done with a condition to check if there are files in the directory?
You can use the file condition for this. If there are no files you can stop the job or do something else.

Regards
Erik
Uses Visualcron since 2006.
Support
2008-09-16T09:34:18Z
Yes, conditions would be the best way because we are using a wildcard when copying and we cannot guess which files that should have been copied.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
karl
2008-09-24T13:19:06Z
A related but subtly different issue: we have a job that copies a file, the file should exist - if it does not we would like the job to fail. The copy task returns successfully regardless of whether the file exists or not (as mentioned by previous posts). Using a condition allows the task to be skipped or the job ended if the file does not exist but the job still finishes showing a success.

If the copy task can't be made to fail (as you say it is using wildcards) could it alternatively be made possible for a condition to trigger a fail as an alternative to stopping the job successfully? Just a thought.
Support
2008-09-24T13:27:32Z
This has been requested before and the idea is to add this to the Error tab of the Task. We will probably add this soon.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top