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.


Support
2013-07-03T22:05:15Z
It sounds like something goes wrong with the Loop. Have you tried logging the current value as well in the loop. Then you can see total values before and each value in the loop to make sure everything is handled correct.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2013-07-03T22:13:54Z
The inconsistancy of the loop is down to the inconsistancy of the variable DownloadedFileNames. It loops for the number of rows in that variable, and each Copy Task in the loop uses the current line as a file mask.

So if the variable falls down, the loop falls down. What I need to find out is why the variable is being inconsistant.

Today it was blank when downloading 10 files in one run, and yesterday it only contained a single file name under the same circumstances. Yet the day before that it ran fine, and in all my testing its fine. I just don't understand.
Support
2013-07-03T22:22:13Z
It is likely that you get sync problems when running multiple Triggers. For example, if you used only the FTP Trigger you would know exactly which files are new and work with that all the time instead of using * when copying files etc.

I would try working with a single Trigger to make sure that works. I am sure the problem happens when you for example Trigger two at the same time and there is a weak link somewhere in the settings.

It is also possible to turn on extended debugging in Server settings->Log. There you will see all the files downloaded. You can also turn on debugging on sent/received in the FTP Connection. The information sent or received will be added to the output column (and Output Variable) so you can compare that info too.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2013-07-03T22:41:16Z
I have debugging enabled in the log, in fact the file I attached in an earlier post shows that. But the variable comes from the FTP Download Task, why is the Triggers affecting the variables of a task?

Also how would I use the FTP Trigger to only download new files? I couldn't see a way for the FTP Trigger to communicate to the FTP Download Task which files are new, the only way I could think of was to retain copies in a temporary folder and set the FTP Download Task to not overwrite unless modified.
Support
2013-07-03T23:07:07Z
Multiple Triggers are not affecting Variables - I am just saying that it makes things more confusing and error prone.

If you used the FTP Trigger only you could play with these Variables to only work with new files:

{TRIGGER(Active|LastTrigger|RemoteFile.Result.Name)}
{TRIGGER(Active|LastTrigger|RemoteFile.Result.Path)}

If you use any of these you can use them along all Tasks.

We will do some tests with FTP download Variables but I do not think there is a problem - at least it should not sometimes work and sometimes not.

I recommend while you are testing that you run the latest beta to make sure we test against the same code base:

http://www.visualcron.co....aspx?g=posts&t=3175 
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2013-07-03T23:42:06Z
I cannot use your Beta, company policy does not allow the use of software currently in testing; only stable commericial releases.

I have tried to use those variables. What I found is if multiple files were put onto the source FTP in one transfer, which happened in less than 30secs, then the job would only receive one trigger, instead of a trigger for every file uploaded. And the Result.Name variable would only contain the name of the first file in that batch. Therefore not workable to determine new files.

I will layout what I'm trying to achieve. All I need to know at this point is can VisualCron do this and if so, how?

Every day between 4:30 to 5:15, a number of files are uploaded to an FTP, we can only download from this FTP, we cannot edit, delete or add. The number of files will change from day to day, and the names of the files will not be consistant either. The majority of the files will arrive prior 5:15pm but more files can still be delivered anywhere up to midnight.

These files need to be emailed to a recipient list. The recipients will not wait any later than 5:15pm for files that are available and any files uploaded after that point must be emailled immediatly. They also need the emails minimised to as few as possible. Sending one email for every file is not viable.

Support
2013-07-04T14:23:56Z
We will start testing, and hopefully complete on Friday, to see if there are any differences between 6.2.2. an 7.0.0 and do some different test cases.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2013-07-04T19:52:20Z
We did a simple test with 6.2.2.

We created one Job with two Tasks:
1. downloads files to a folder
2. use the file write Task to write down the value

We ran it many times and the value was the same (correct with all files there) all the time. Can you reproduce the problem with this test?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Guest
2013-07-04T22:47:21Z
Sorry for not posting earlier. It's been a mad day. I did the job from scratch taking into account certain points I had taken from this thread. Firstly 2 triggers is a bad idea, secondly, depending on DownloadedFileNames in a loop isn't a robust way to do it, and third, exceptions combined with the FTP Trigger is a bad idea.

So I divided up my original Job into two Jobs. The first has no exceptions and uses the FTP Trigger. Whenever it triggers it uses the FTP Download Task with the {TRIGGER(Active|LastTrigger|RemoteFile.Result.Name)} variable to download each file that triggered the Trigger into a temp folder. I know I said I used this variable, but the version I used had an ID instead of "RemoteFile". By using that version I've had no issues.

Then the second Job runs on an exception that won't let it start running till 5:15pm till 12am. It will run on time intervals for every minute. And will run an Email Task with a condition that the temp folder must contain some files. If the temp folder does contain some files, it attaches them to an email, sends them off and deletes them.

Using this setup I had a successful test today. It has seriously put my mind at ease about tomorrow's deadline.
Support
2013-07-08T07:28:55Z
Ok, thanks for the feedback. Let us know if you want to follow up regarding the first setup.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top