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.


tcbenkhard
2011-07-21T15:18:54Z
So hi everyone,

Just started using VisualCron and having difficulties creating the following procedure:

1. Run a query comparing 2 tables, the result are the rows that differ (normally none, sometimes 1 or 2)
2. IF (1.) has a result then I want these rows to be updated from table 2 to table 1 (since table 2 is right)
3. IF (1.) has a result I want to get an email containing the rows from (1.) that have been updated.

I have about 15 of these I need to put in visualcron so I was trying to make it really general since there are only 3 tasks:

1. sql select
2. update
3. mail

How can I best approach this?
Sponsor
Forum information
Support
2011-07-22T08:57:30Z
You have to use Conditions to control the flow. Create the three Tasks first. Then you can add one Condition of type VisualCron to the update Task.

In the condition you want to continue with update if output != the desired values. So, you need to change it to "Not contains"->Output.

In the Actions of the condition you want to go to the email Task if "No match" (Contains desired output).

The only thing left is that Tasks are run in order and if you do nothing the Email Task will be run after update. This can be solved in at least 2 ways. Either you could have the email Task in another Job and set "No match" to run that Job. Or you could add a Condition to the email Task that is the opposite of the first Condition (so, when Update Task has been run it will go to email task and then if the output != desired it will exit the job).

Hope this helps (even though somewhat confusing!)

Originally Posted by: tcbenkhard 

So hi everyone,

Just started using VisualCron and having difficulties creating the following procedure:

1. Run a query comparing 2 tables, the result are the rows that differ (normally none, sometimes 1 or 2)
2. IF (1.) has a result then I want these rows to be updated from table 2 to table 1 (since table 2 is right)
3. IF (1.) has a result I want to get an email containing the rows from (1.) that have been updated.

I have about 15 of these I need to put in visualcron so I was trying to make it really general since there are only 3 tasks:

1. sql select
2. update
3. mail

How can I best approach this?



Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top