Get Tasks by Type / Connection by Host - VisualCron - Forum

Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline MRomer  
#1 Posted : Friday, July 21, 2017 11:51:56 PM(UTC)
MRomer

Rank: Paid support

Joined: 11/27/2012(UTC)
Posts: 54
United States
Location: Memphis, TN

Thanks: 8 times
Was thanked: 8 time(s) in 8 post(s)
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

Edited by moderator Tuesday, July 25, 2017 11:47:17 AM(UTC)  | Reason: Not specified

Offline Support  
#2 Posted : Saturday, July 22, 2017 12:00:35 PM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,258

Thanks: 877 times
Was thanked: 450 time(s) in 427 post(s)
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!
thanks 1 user thanked Support for this useful post.
MRomer on 7/24/2017(UTC)
Offline MRomer  
#3 Posted : Monday, July 24, 2017 9:24:12 PM(UTC)
MRomer

Rank: Paid support

Joined: 11/27/2012(UTC)
Posts: 54
United States
Location: Memphis, TN

Thanks: 8 times
Was thanked: 8 time(s) in 8 post(s)
Thank you. That's what I thought.
Offline SnapDiligence  
#4 Posted : Tuesday, August 15, 2017 7:24:02 PM(UTC)
SnapDiligence

Rank: Paid support

Joined: 2/17/2017(UTC)
Posts: 10
United States
Location: Texas, Houston

Thanks: 2 times
Was thanked: 3 time(s) in 3 post(s)
Originally Posted by: MRomer Go to Quoted Post
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.
thanks 1 user thanked SnapDiligence for this useful post.
Support on 8/16/2017(UTC)
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Scroll to Top