SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Way to see what Jobs run in which Queues

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Way to see what Jobs run in which Queues
Author Message
mmittiga



Joined: 03 Aug 2010
Posts: 14
Country: United States

Post Way to see what Jobs run in which Queues Reply with quote
Is there a way to see what what jobs are set to run in which job queue without having to go through each and every job. We have a couple of hundred jobs running in 15 queues.

Thanks
Tue Aug 03, 2010 10:21 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
One way to do it is to use cons.bat/cons.sh to get a list of jobs ("list jobs" command) and output that list to a text file and then convert each line to "describe [job id] QUEUE" command and run this resulting text script using the same cons.bat/cons.sh method
Tue Aug 03, 2010 2:13 pm View user's profile Send private message
mmittiga



Joined: 03 Aug 2010
Posts: 14
Country: United States

Post Way to see what Jobs run in which Queues Reply with quote
I can not seem to find a cons.bat anywhere. We are using version 3.4.26 We are running way to many job queues and it is causing the scheduler to crash. I need to see what is running in what queue at what time and then move jobs around. I want to get down to 10 queues
Tue Aug 03, 2010 2:36 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
You are likely running Windows version of 24x7. It doesn't support command line mode interface and that's why there is no cons.bat.

Here is what you can do to query job properties using a JAL job. The script is based on the example I copied fro mthe 24x7 on-line help
Please make sure this job is run non-detached


Code:
// declare script variables
Dim( job_list, string )
Dim( no_more, boolean )
Dim( job_id, string )
Dim( job_name, string )
Dim( queue, string )
Dim( report, string, "\t\tREPORT\r\n\r\n" )

// build job list
JobList( "", job_list )

// parse the list
isEqual( job_list, "", no_more )

LoopUntil( no_more, END_LOOP )
   // get next job ID
   GetToken(",", job_list, job_id )
   // get job name, and queue
   JobDescribe( job_id, "NAME", job_name )
   JobDescribe( job_id, "QUEUE", queue )
   // append to the report
   ConcatEx( report, job_id, "\t", job_name, "\t", queue, "\r\n", report )

   isEqual( job_list, "", no_more )
END_LOOP:

// save report to file
FileSave("c:\\report.xls", report )

Tue Aug 03, 2010 7:20 pm View user's profile Send private message
mmittiga



Joined: 03 Aug 2010
Posts: 14
Country: United States

Post Reply with quote
Thanks for reply!

job fails with mismatch error here:
isEqual( job_list, "", no_more ) <<<mismatch error
END_LOOP:

I am sure its simply but I am not seeing why?
Tue Aug 03, 2010 10:26 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Is that an old version of 24x7?
Please try the following

Code:
// declare script variables
Dim( job_list, string )
Dim( no_more, boolean )
Dim( job_id, string )
Dim( job_name, string )
Dim( queue, string )
Dim( report, string, "\t\tREPORT\r\n\r\n" )

// build job list
JobList( "", job_list )
Concat( job_list, ",0", job_list

// parse the list
isEqual( job_list, "0", no_more )

LoopUntil( no_more, END_LOOP )
   // get next job ID
   GetToken(",", job_list, job_id )
   // get job name, and queue
   JobDescribe( job_id, "NAME", job_name )
   JobDescribe( job_id, "QUEUE", queue )
   // append to the report
   ConcatEx( report, job_id, "\t", job_name, "\t", queue, "\r\n", report )

   isEqual( job_list, "0", no_more )
END_LOOP:

// save report to file
FileSave("c:\\report.xls", report )

Tue Aug 03, 2010 10:56 pm View user's profile Send private message
mmittiga



Joined: 03 Aug 2010
Posts: 14
Country: United States

Post Reply with quote
Hmm same thing again mismatch:

// parse the list
isEqual( job_list, "0", no_more ) <<====
Wed Aug 04, 2010 10:45 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
Please try this one

Code:
// declare script variables
Dim( job_list, string )
Dim( no_more, boolean )
Dim( job_id, string )
Dim( job_name, string )
Dim( queue, string )
Dim( report, string, "\t\tREPORT\r\n\r\n" )

// build job list
JobList( "", job_list )
Concat( job_list, ",[0]", job_list

// parse the list
isEqual( job_list, "[0]", no_more )

LoopUntil( no_more, END_LOOP )
   // get next job ID
   GetToken(",", job_list, job_id )
   // get job name, and queue
   JobDescribe( job_id, "NAME", job_name )
   JobDescribe( job_id, "QUEUE", queue )
   // append to the report
   ConcatEx( report, job_id, "\t", job_name, "\t", queue, "\r\n", report )

   isEqual( job_list, "[0]", no_more )
END_LOOP:

// save report to file
FileSave("c:\\report.xls", report )

Wed Aug 04, 2010 3:11 pm View user's profile Send private message
mmittiga



Joined: 03 Aug 2010
Posts: 14
Country: United States

Post Reply with quote
That worked, awesome thanks! is there a field to show job start time?
Wed Aug 04, 2010 3:34 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
START_TIME - returns/sets job start time; the meaning of this value depends on the job schedule type, and makes no sense for event based jobs.

For more info please check "JDL Properties" topic in the on-line help.
Wed Aug 04, 2010 5:41 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.