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