[solved] Manual retry - VisualCron - Forum

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.

Hi All,

I've been playing with VisualCron evaluating it for automating some tasks.
I must say that it has enourmous potential and prompts you to do things that you would not normally expect from an ordinary scheduler.

Anyway, I have a simple scenario to automate:
- runs daily
- pickup a file (ts in file name) from an FTP
- retry 5 times with delay, fail if number of retries is exceeded
- unzip
- load files into a db
- kick of processing

I see that tasks have on failed logic but for an FTP failure to get a file is not a failure.

The way i've done is:
- created a counter variable

- task 1 - to reset a counter variable
- task 2 - to increment a counter
- task 3 - (.net) check counter var, throw an exception if a counter is exceeded, exit on failure
- task 4 - download zip
- task 5 - (.net) check file exists, throw if not, on failure go to task 2
- task 6 - unzip
- task 7/8 - call a batch file
- task 9 - kick off SQL server query

Is there a better way to achieve the same?
How do i introduce a delay between tasks 5 & 2?
Handling of variables in .NET tesks is odd. If i declare method that takes an int and assign it to a VC variable i'll only get a the initial value, however if i declare method with a string param and count is to int it gets the correct value (in my task 2).

Any comments?

Forum information
Hi abshmak,

Welcome to the forum!

What you can do is create a condition which is checking if you file is there.
You can attach a condition to a task.
With the actions of this condition you can manage the flow. If the file is there continue, if not go to task...
There is also a wait task in visualcron so if you need to use it, you can.
By using a condition, you don't need the use of variables.

Uses Visualcron since 2006.
Thanks, could not find the wait task initially, but your post forced me to look more closely and i managed to find it.

Also managed to rework some of the code to use conditions.
Scroll to Top