Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


lal
  •  lal
  • No customer Topic Starter
2011-05-17T01:30:49Z
On our servers (version 4.9.26 through recent version 5x servers - most jobs are still on version 4), we will need to change many existing tasks, notifications, etc to use a new credential. The credential already exists; just that there are many tasks and other things set to a different credential that will need to be changed to the new credential.

I looked to see if there is a way to change this globally from the xml files; but for one thing it appears that the credential username and domain are encrypted, and for another i didn't see a way to change the association to the task from one credential to another by making the change to the xml files.

Any suggestions for the best way to do this?
Sponsor
Forum information
ErikC
2011-05-17T07:56:28Z
Hi lal,

Changing credentials in bulk, hmmm...

1) I don't know your programming skills, but you can use the API for this.
Itterate through all jobs / tasks and setting the right credentials is then done in a few seconds.

2) You can also use the GUI for this, but this is a time consuming task. It might be the only answer to your question.

3) Editing the xml files I would not recommend. If you break something I don't know how Visualcron will react. You might lose stuff.

So I would go for option 1 or 2.

Regards,
Erik
Uses Visualcron since 2006.
trevinom
2012-03-26T19:52:03Z
Erik,
I am faced with the same situation as the above poster. Do you, or anybody else have an example of option 1 on the above post?

Martin
ErikC
2012-03-27T06:16:52Z
Hi trevinom,

There are some examples out ther showing you how to itterate through all the jobs and their tasks I guess, but every task type has it's own properties, so also point 1 is a bit hard to program.

I can tell you somethings over point 3:
There is a file called networkcredentials.xml. In here you can see <Id> tags. These tags are used in the jobs.xml file.
You can do a search replace action changing the current Id's in the jobs.xml
To know which Id to use, you have to try (if you have multiple in the networkcredentials.xml).

!!BEFORE DOING THIS, PLEASE MAKE A BACKUP OF YOUR XML FILES!!

I still advise you to do it manually though (point 2).

Regards,
Erik
Uses Visualcron since 2006.
trevinom
2012-03-27T13:15:50Z
I have 5 jobs that have 21 tasks each. They all have the same tasks other than they are executed on different files. I have a test and a production environment.
Each job has an onerror task at the end that is executed only if that particular task fails.
Each task needs the credentials, onerror task id, and ftp server id's changed to point from test to production.
That's 100 total tasks that need 3 clicks each on the test environment...then again in the production environment....I find myself forgetting which I've changed and which I haven't...and VERY time-consuming.

I found a product called 'Multiple File Search and Replace' which allows me to search strings in xml files and replace them.
So, using your example, I search for the task id's of the 'onerror' task as well as the server id and credentials id. I then created templates for replacing all 'test' variables with 'production' variables.
So, I extracted each test job to an xml file. Searched for the 'OnError' task and replaced that string on all the other tasks. I did this for the credentials id and the ftp server ids.

Thank you for all your help!!
Users browsing this topic
Scroll to Top