Ability to use variables to specify credentials - VisualCron - Forum

Community forum

TomWB
  •  TomWB
  • No customer Topic Starter
2013-07-03T15:06:37Z
I've made a job that performs certain tasks on a given target server, remotely and need to run this job multiple times for different systems.

Rather than create multiple copies of the same job with different credentials specified on the 'Remote Execute' tasks in each, it would be useful if I could choose which credential to use based on a job variable.

For example:

Say I have a job called 'Backup' that includes a job variable called 'TargetServer'. I want to run the job twice, once for SERVER1 and once for SERVER2. I have saved credentials for both systems in VisualCron.

I make an 'umbrella' job that runs two tasks:

Task 1 runs the job 'Backup' with 'TargetServer' set to 'SERVER1'
Task 2 runs the job 'Backup' with 'TargetServer' set to 'SERVER2'

For this to work you would need to be able to configure the 'Remote Execute' tasks in the job 'Backup' to use the 'Administrator@{JOB(Active,Variable,TargetServer)}' credential.

Therefore task 1 would look for Administrator@SERVER1 and task 2 would look for Administrator@SERVER2.

You could also have a variable called 'Username' on each job run, and therefore configure the remote execute tasks to use the '{JOB(Active,Variable,Username)}@{JOB(Active,Variable,TargetServer)}' credential

Obviously there are lots of places this could apply, my example only includes remote execution tasks because that's all I'm using that requires credentials.

For now I've got round this by cloning the job I intend to run twice, but these means when I modify it I have to do the modifications twice, or delete one and clone it again. This could obviously get quite cumbersome as more systems are introduced.

Just a suggestion!

Thanks,

Tom
KJDavie
2013-07-30T23:54:52Z
+1 for Tom's request, and I would like to reinforce

"Obviously there are lots of places this could apply, my example only includes remote execution tasks because that's all I'm using that requires credentials."

Without wanting to hijack this feature request, per the above we encounter the same issue with Connections and the Read SQL task, where we end up with replicated jobs performing the same function for different connections, with the same maintenance concerns Tom has raised.

Ditto Connections in FTP tasks.

So the more general point might be review the ability to use variables in those places / on those tasks where there currently appear to be drop downs would offer great increases on task / job reuse and maintainability.

Obviously this may result in more runtime errors if the variable is not set / user is not valid, but this is really no different than if the Credential / Connection originally chosen from a drop down is not/no longer valid.

Kevin
KJDavie attached the following image(s):
Scroll to Top