It is currently 24 Jul 2017 5:00


Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 27 Jan 2014 7:00 
Offline
Nouveau
Nouveau
User avatar

Joined: 18 Jan 2014 9:00
Posts: 26
Hi All,
I want write a script that should report me all the jobs that are running over 12 hours. I started it using "ctmpsm -listall |grep executing"
but it lists all the jobs that are currently executing. How can I filter the list of jobs running over 12 hours out of this list ?

Please help. Thanks in advance..


Top
   
 Post subject:
PostPosted: 15 Apr 2014 4:18 
Offline
Nouveau
Nouveau
User avatar

Joined: 14 Apr 2009 8:00
Posts: 6
Hi,

You can try the below query in a script

select ORDERNO,APPLGROUP,JOBNAME,STATUS,STATE,STARTRUN,ENDRUN,ORDER_TIME from CMR_AJF where STARTRUN < 'yyyymmddhhmmss' and STATE = '4'

This should help.


Top
   
 Post subject:
PostPosted: 17 Apr 2014 9:45 
Offline
Nouveau
Nouveau
User avatar

Joined: 19 Jun 2013 8:00
Posts: 36
what kind of database are you using?


Top
   
 Post subject:
PostPosted: 24 Apr 2014 8:33 
Offline
Nouveau
Nouveau
User avatar

Joined: 18 Jan 2014 9:00
Posts: 26
Thats cool.

I don't have db access. I did that using "ctmpsm" utility.

ctmpsm -listall TIME |grep "executing"

It worked :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+10:00


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved