Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Query for TASK + Schedule
Topic Summary:
Created On: 07/24/2013 02:21 PM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 07/24/2013 02:21 PM
User is offline View Users Profile Print this message

Author Icon
AndrewHoeschen
Expert (100-199)

Posts: 162
Joined: 11/03/2010

Is there a way for me to get a list of all our tasks and schedules into some sort of CSV?

I was trying to figure out the structure in SQL, and I think I'm close, pending the source is always the schedule, but it's not working right either.



 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 07/28/2013 05:39 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Andrew,
I'm afraid the many INNER JOINs make it too restrictive to get both tasks and schedules.
My preference would be a compound FROM and WHERE clause.

 Category Survey
AutoMate BPA Server 8 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 07/29/2013 07:59 AM
User is offline View Users Profile Print this message

Author Icon
AndrewHoeschen
Expert (100-199)

Posts: 162
Joined: 11/03/2010

I don't believe that is any part of the problem. Those joins are strictly limiting the output to tasks that have relations in both directions, which is all I want to see. I think the relation is more complex than what my query represents though, since the relation can be either direction, and their relation table seems to have this "SourceID/DestinationID" mentality.

 Category Survey
 07/29/2013 09:11 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Andrew,
I wish you are right.
But hereunder is the basic script utility I use when I need querying the database.
It gives it results as debug.print's in the IDE.
It has the capability to run a number (currently 12) of different queries, which are described in the CaseNames array and in comments.
Notice that my own BPA8 Server system is "LEN-W700", which is referenced in the DataSource variable

 Category Survey
AutoMate BPA Server 8 version:
Windows version:



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 07/29/2013 09:40 AM
User is offline View Users Profile Print this message

Author Icon
AndrewHoeschen
Expert (100-199)

Posts: 162
Joined: 11/03/2010

Thanks, I'll take a look at that to see what I can decipher for my needs!

 Category Survey
 07/29/2013 10:38 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

I forgot mentioning that the script is set to run query no 4 (list all tasks).
You can run other queries just by setting the query_number variable to another value than 4

 Category Survey
AutoMate BPA Server 8 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 01/13/2014 10:08 AM
User is offline View Users Profile Print this message

Author Icon
AndrewHoeschen
Expert (100-199)

Posts: 162
Joined: 11/03/2010

It turns out I was close like I had thought. I got what I needed from this simple query, hopefully it can help others. We use BPA8

 Category Survey



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


Edited: 01/14/2014 at 06:44 AM by AndrewHoeschen
 01/13/2014 10:10 AM
User is offline View Users Profile Print this message

Author Icon
AndrewHoeschen
Expert (100-199)

Posts: 162
Joined: 11/03/2010

BTW, this makes a couple assuptions, one that the you only care about scheduled triggers (that's all we use), and that the trigger is the source in the relationship (pretty sure it always will be). You could modify for other trigger types if you like, just wasn't worth me looking at.

 Category Survey
 01/14/2014 01:37 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Andrew,
thank you for your follow up.
Your inner join approach is very clever.

 Category Survey
AutoMate BPA Server 8 version:
Windows version:


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1521 guests browsing this forum, which makes a total of 1521 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog