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.


cstump
2010-05-25T22:24:34Z
I like the proposed solution. Works great for dingle tasks. Looping on multiple tasks by putting them in a separate job is a workable solution.

I have a need for this type of solution fairly often, so I am all in favor of it!!!

Chuck
ErikC
2010-10-05T12:06:43Z
I was thinking about this feature again and came up with the following:

Use two tasks for the looping.

A 'Start loop' task where you setup everything for the way the looping works.
An 'End loop' task which will jump back to the selected 'Start loop' task.

Nested loops are possible but no cross loops.

So this would/must be possible:

-- start loop 1
|- task 1
|- task 2
|- task 3
|- task 4
-- end loop for start loop 1
-- start loop 2
|- task 5
|- task 6
|- -- start loop 3
|- |- task 7
|- |- task 8
|- -- end loop for start loop 3
-- end loop for start loop 2


And this isn't possible:

-- start loop 1
|- task 1
|- -- start loop 2
|- |- task 3
|- |- task 4
-- end loop for start loop 1
   |- task 4
   |- task 5
   -- end loop for start loop 2


In the start loop you configure at what data to loop, previous-/selected task output. What is discussed in previous posts.
The end loop is just pointing to which start loop in belongs. The selection of the right start loop task could be intelligent so no cross looping will occur.

If you forget the end loop task, there is no looping!

What about this version of looping?

Regards,
Erik
Uses Visualcron since 2006.
ErikC
2010-10-07T13:23:43Z
Just to give my last text some pictures:
ErikC attached the following image(s):

Uses Visualcron since 2006.
hawkings
2010-10-08T13:27:22Z
Hey Erik

That looks like a simple, and thus good solution.

I have an addition added to this proposal:


-- start loop 1
|- task 1
|- task 2
-- end loop for start loop 1 (conditioned)
|- task 3
|- task 4
|- task 5
-- end loop for start loop 1 


What I mean is that it is possible to add several "end loop" tasks, which should correspond to skip a step:

for i=1:10 {
  x = i^2;
  if x < 10 continue; //skip step
  print x
}


However it means that the "start loop" should go to the LAST paired "end loop" task, instead of just the next.

Just my 5'o

-René
ErikC
2010-10-11T12:04:29Z
Hi hawkings,

Thinking about your suggestion, you can have mulltiple end loops. You should use the normal conditions to skip an end loop task. You can use e.x. the variables from the start looping task (counters) to use in the condition.

The start loop doesn't care is there is no matching end loop. If there is none present, there is just no looping. All tasks runs once.

However...

In the end loop task you should be able to select the right start looping task. With more end loop tasks per start loop, cross looping could be easily performed. The job overview is also more complex in this situation.

I agree with the flexibility of more end looping tasks, but I prefer one end looping task job per start looping task for now.


Regards,
Erik
Uses Visualcron since 2006.
SPIEDV
2010-11-22T17:12:31Z
Hello there,

I got following problem to solve and I can't think of a solution, maybe some of you can help:

We have a file in which we have a random number of IDs (those can change every day), for example random.txt:

XS2103S21249
XS2103S21250
XS2103BB3D24
AK2305028495
...


Now I would need to read every ID from the file and start a FTP-Upload, using the ID as one of the parameters. We would need to do that for every ID in the file.

I wonder if it is possible to create that in VisualCron (without a batchscript etc).

One solution would be to just generate one file for every ID, with filename = ID and just pass the name as parameter for the FTP-Upload.

Basically that would work, I'm just worried that VisualCron will have problems having around 500 (or more) jobs beeing queued.

Regards,
SPIEDV
ErikC
2010-11-23T08:50:58Z
At this time there is no looping capability in Visualcron.
So it is hard, maybe impossible, to do this only with Visualcron tasks.

I have a same problem over here and I solved it this way:

I created a .net program reading the text file (with IDs) and writing the 1st line onto my screen, removing this line also from the file.
With this output I start my 2nd task.
The last task is running my 1st task (reading/showing/deleting ID from text file).
So this keeps running.

I als have a condition on the 2nd task which is checking the output of the 1st task. If it's empty stop the job.

So this is my solution.


The .net program I created looks a lot like the unix command 'HEAD' with two extra options, skip empty lines and also remove the 1st line from the file.


Hope to see some repetition posibility in the near feature in Visualcron though.


Regards
Erik
Uses Visualcron since 2006.
SPIEDV
2010-11-23T16:49:45Z
I think I got it working for me, maybe not the most beautifull solution but it should be ok for testing.

I start with a filetrigger on the file containing the IDs.

1) Read File: where my Filepath is {TRIGGER(Active,LastTrigger,File.Result.FullPath)}

2) Then I get the first ID with {STRING(Substring|{TASK(<Read File - TaskId>,StdOut)}|0|12)} - Since our IDs always have 12 characters - and pass it as a parameter to the FTP call.

3) Write File: in the same folder where the original file is created (so the job will trigger again). As Filepath I use Filename_{DATEFORMAT(yyyyMMdd_hhmmss)}.txt and my Value is: {STRING(Remove|{TASK(<Read File - TaskId>,StdOut)}|0|14)}. This will remove the first line and the newline character. In the main settings tab the checkbox "Put Job in queue" needs to be enabled.

4) Delete File: deletes the triggerfile, Folder:"{TRIGGER(Active,LastTrigger,File.Result.Folder)}" , Include file mask: "{TRIGGER(Active,LastTrigger,File.Result.Name)}"

5) 1 Second Wait: just to be sure that the new file has a higher timestamp than the previous one since it could be that the job is finished within one second.


Further I created a conditionset, containing 10 different conditions which checks the triggerfile if it contains a number (0,1,2,3,4,5,6,7,8,9), because our IDs will always have atleast one number in them.

All tasks except nr. 4) have that condition.

So the jobs just triggers itself as long the file contains a number, if not it deletes the last generate file (which should not contain something except maybe some blanks / linebreaks).

Altought I will test it for some time I see a major problem: If there goes something wrong with the creation of the original file, be it just an additional blank somewhere, it can mess up the whole upload-task.

Regards,
spiedv
ErikC
2010-12-14T08:13:27Z
Any news/progress from the Visualcron team?

Regards,
Erik
Uses Visualcron since 2006.
Support
2010-12-14T09:42:13Z
Right now we are focusing on some Job/Task logging history. We'll see what the next step is after that. Thank you for your patience.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2010-12-14T11:15:36Z
Hi again all,

as this looping functionality needs to be customized for each Task we would like to hear:

1. which Tasks should we prioritize?
2. please give an example of a real case scenario you would like to loop
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
cstump
2010-12-17T16:03:28Z

Here is a scenario that comes up a lot.

Iterate through a list of values and execute a set of tasks for each. The set of tasks to be executed varies but frequently revolves around executing a SQL task or an AD task and then some associated email/logging/webdav tasks for archival and notification of the results.

The "list" to iterate through is usually a text file. That text file may be the result of some previous task or (SQL output ow write stdout to a file) or soem data file given to me.

Hope that helps,

Chuck
ErikC
2010-12-20T08:24:41Z
Support wrote:

as this looping functionality needs to be customized for each Task


Just wondering how the solution looks like.
Is the idea of having two extra tasks for starting and ending a loop not a better way, than you don't have to customize evry task.

Regards,
Erik
Uses Visualcron since 2006.
Support
2010-12-20T08:50:47Z
ErikC wrote:

Support wrote:

as this looping functionality needs to be customized for each Task


Is the idea of having two extra tasks for starting and ending a loop not a better way, than you don't have to customize evry task.



We still think about other alternatives, but it may be harder to make the visual change for a start/end loop Task. Let us think about it a little bit more. Thank you for your comments.

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-12-20T10:33:27Z
What about looping more tasks in a row when the looping is per task?

I now have a job, which loops, with the folowing steps:

- Get a listing with directory names
- Disable the task which is getting the directory list
- Get the 1st dir name from this list
- Do a lookup with this dir to get a different name
- Copy some files which uses the lookuped name
- Remove the top directory name from the list
- while the directory name isn't empty start the job again
- Enable the directory listing task again

This job has a lot of conditions. These conditions makes the looping work and the enable / disable task, task.

How would this be solved with the idea of having a looping capability per task?

Regards,
Erik

Uses Visualcron since 2006.
Support
2010-12-20T10:38:27Z
ErikC wrote:

What about looping more tasks in a row when the looping is per task?

I now have a job, which loops, with the folowing steps:

- Get a listing with directory names
- Disable the task which is getting the directory list
- Get the 1st dir name from this list
- Do a lookup with this dir to get a different name
- Copy some files which uses the lookuped name
- Remove the top directory name from the list
- while the directory name isn't empty start the job again
- Enable the directory listing task again

This job has a lot of conditions. These conditions makes the looping work and the enable / disable task, task.

How would this be solved with the idea of having a looping capability per task?

Regards,
Erik



Sounds like an advanced loop - a good example for testing limitations of solutions. Thanks.

Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-12-20T10:43:55Z
Support wrote:

... but it may be harder to make the visual change for a start/end loop Task...

What change are you talking about, the change in the main view of the application?

Regards,
Erik
Uses Visualcron since 2006.
Support
2010-12-20T10:50:49Z
Yes, if we are going to make changes in the Main view, Flow chart etc. Maybe we are not doing that at the moment - but we are thinking about the effects right now.

It is also a very different approach as objects has to passed around and could create a lot of errors if loops are not setup carefully.

We will compare the solutions.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2010-12-20T10:54:18Z
Never said it would be an easy task to do 😎.
Uses Visualcron since 2006.
ErikC
2011-06-23T06:26:31Z
Hi Support,

Is there any news about this item? I'm currious. 😎

Regards
Erik
Uses Visualcron since 2006.
Support
2011-06-23T06:33:20Z
Originally Posted by: ErikC 

Hi Support,

Is there any news about this item? I'm currious. 😎

Regards
Erik




We are about to start with some development soon. The plan is probably to add permissions to Job level first and then start with the looping support. Between that we are also working with some cloud Tasks and 7z support.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2011-08-24T11:41:37Z
We will start development very soon. We would like to have some "real world" examples so we can decide if our looping model will hold.

We would like to know what you would like to loop and how - and what you expect from it.

Thank you.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
osirisja
2011-08-24T15:08:37Z
Hi Henrik

I am currently evaluating a number of automation products for a large customer of mine and one of the main requirements is to Loop through the contents of an environments lookup file (csv), match a particular record/row with an incoming data file name, and then loop through 3 different template files, filling in 'replacement' variables from values defined in the matched environments lookup file.

So I guess this is a loop with three nested loops combined with perhaps List/Array Variable types.

This has now left me in a bit of a position because my preference is to select VisualCron, however given that it is not possible to apply loops and arrays I fear I may have lost the battle in favour of a far more expensive solution that doesn't have as good a user experience as VC.

I'm hoping you can provide a workable solution to this problem (which doesn't involve external scripts as we are trying to get away from a dependency on scripting). Also can you give me an idea when Looping features might be introduced, given that you have been discussing them for some 2 years now.

Many thanks

Andy
Support
2011-08-24T20:48:09Z
Hi Andy,

I think we require a month. We have some ideas but this requires fundamental changes in the core so we really want to make it right and as generic as possible to open up for all kind of looping.

We will post updates in this thread if we have questions, comments or something for testing.

The final result will require no scripting at all.

Thank you for your patience.

Originally Posted by: osirisja 

Hi Henrik

I am currently evaluating a number of automation products for a large customer of mine and one of the main requirements is to Loop through the contents of an environments lookup file (csv), match a particular record/row with an incoming data file name, and then loop through 3 different template files, filling in 'replacement' variables from values defined in the matched environments lookup file.

So I guess this is a loop with three nested loops combined with perhaps List/Array Variable types.

This has now left me in a bit of a position because my preference is to select VisualCron, however given that it is not possible to apply loops and arrays I fear I may have lost the battle in favour of a far more expensive solution that doesn't have as good a user experience as VC.

I'm hoping you can provide a workable solution to this problem (which doesn't involve external scripts as we are trying to get away from a dependency on scripting). Also can you give me an idea when Looping features might be introduced, given that you have been discussing them for some 2 years now.

Many thanks

Andy



Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2011-08-25T11:50:31Z
osirisja wrote:

I'm hoping you can provide a workable solution to this problem


Hi Andy,

I have a simular issue. I'm scanning a dir and for every folder I lookup the foldername in a csv file and get the column next to it in the csv file and use this text for the next tasks. If all the tasks are done I get the next folder and do the same tasks again till all the folders are processed.

I have it working in Visualcron, I have some conditions, a jump and some tools outside VC to get what I want. Still a VC solution is better, but you are able to get it working in VC.

Regards,
Erik
Uses Visualcron since 2006.
Scroll to Top