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


MRomer
2017-07-21T21:51:56Z
Is there a way to use the API to get a list of tasks of the same type? I've created a collection of jobs that I'm going to export from my main box and import at several other locations we have. I'm working on a PowerShell script to make it easy to customize the settings that are unique to each location. One thing I would like to do is to check all the FTP tasks to verify that they are set to use the correct connection. In the future, I may want to add a second FTP connection and switch some or all of the tasks to the new connection. The only way I've thought of so far is a nested loop that would iterate through all the jobs looking for FTP tasks. Is there a way to just to straight to the tasks without having to go through the jobs?

+ Mark
Sponsor
Forum information
Support
2017-07-22T10:00:35Z
No,

fastest way would be to;

Loop through all Jobs
- Loop through all Tasks in the Job
-- Check TaskType property of Task
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
MRomer
2017-07-24T19:24:12Z
Thank you. That's what I thought.
Guest
2017-08-15T17:24:02Z
Originally Posted by: MRomer 

Thank you. That's what I thought.



You could pipe the lists through several "where {$_}" to filter out the FTP tasks, but you might want to just use the GUI if possible. I've tried to set up scripts to do the same thing, but it's easier sometimes to use the Object finder tool and then just manually swap them out:

In the GUI:
Tools >> Object Relations >> Object Type: Connection >> Object Name: <your connection here> >> Dcl click the object >> swap out the connection

Of course, if it's like more than 50 or so connections, the scripts about it.
Scroll to Top