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.


jrtwynam
2018-09-14T19:50:24Z
Hi,

We have several different database environments set up, where I'd like to run essentially the same job against each of them. What I did is created the job and tested it against one database, and then cloned it for another. The issue I have is that in some of the tasks, I've referenced other variables by direct ID, mainly because I couldn't use "active" or "previous". So for example, I might have a job (call it Job 1) with these tasks:


  1. Start a log entry for the current run.
  2. Query a database.
  3. Write the number of records found to the log, using the task ID of step 2.
  4. Loop through the records. For each row in the output of step 2, update a different database with the current values in the loop.


So in step 3, there'd be a variable something like {TASK|<my task ID here>|Result.NoRows}. When I clone the job (call it Job 2), what I end up with is an exact duplicate of Job 1. That is, the variables used in Job 2 actually reference the tasks in Job 1. So I have to go through all the tasks and all the loops and make sure I update all the references so that everything within Job 2 actually points to tasks in Job 2. Is there an easier way to clone a job like this?

Or, alternatively, is there a way to pass a connection as a variable? That way, if I wanted to run the job 3 times against 3 different databases, I'd only need to set up the procedure once. Then, I could create a separate job with 3 tasks, each of which runs this procedure but with different connections. That's assuming that the job steps are 100% identical, though.
Sponsor
Forum information
Scroll to Top