It is currently 21 May 2018 5:06


Post new topic  Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 29 Apr 2014 5:51 
Offline
Nouveau
Nouveau
User avatar

Joined: 11 Jul 2013 12:00
Posts: 13
How can I order a job to run, from another job that exceeds a specified run time?

Is it possible to post an In-Condition from another job when the other job exceeds a time limit?

For example: If JOB_A runs >60 minutes, how can I have JOB_B start?

Thanks.


Top
   
 Post subject:
PostPosted: 30 Apr 2014 12:32 
Offline
Nouveau
Nouveau
User avatar

Joined: 19 Jun 2013 12:00
Posts: 36
well in my knowledge you can do a shout with exectime as trigger but can't do a condition. in any case if your job is running on a unix/linux based system then you could do a work around (some ideas came popping up on my head)


Top
   
PostPosted: 30 Apr 2014 5:35 
Offline
Nouveau
Nouveau
User avatar

Joined: 11 Jul 2013 12:00
Posts: 13
If an exectime can do a 'trigger' of another job, that may be what I'm looking for. Let me know how this is set-up.


Top
   
 Post subject:
PostPosted: 01 May 2014 8:07 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Jan 2006 12:00
Posts: 473
Hi Mel_A,

For this issue you can use the 'ctmsys' utility --> 'Shout destination tables'
Subjet already discuss in this forum, search 'Shout Table' for some examples

_________________
Best regards
Walty


Top
   
 Post subject:
PostPosted: 01 May 2014 6:53 
Offline
Nouveau
Nouveau
User avatar

Joined: 11 Jul 2013 12:00
Posts: 13
The 'ctmsys' utility are related with the physical destination names. I did see the Destination Type of P to send the shout to a specific program?

I could not find any samples on how a batch jobs can be triggered.

Can you provide reading materials or samples?

Thanks.


Top
   
 Post subject:
PostPosted: 02 May 2014 9:27 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Jan 2006 12:00
Posts: 473
Hi Mel_A,
Just a little example that order Job(b) if a Job(a) exceeds a specified parameters like LATETIME, LATESUB or EXECTIME

Step1:
From the "ctmsys" menu, goto "Shout Destination Tables" and define a shout destination with type "P" (program), Address Type "S" (server), Logical Destination "Order_Job" and Physical Destination "$HOME/ctm_server/my_jobs_directory/Order_Job.sh".

Step2:
Go to your "$HOME/ctm_server/my_jobs_directory and create a script named "Order_Job.sh", which contains the following lines:
#!/bin/sh
My_Schedtab=`echo $2 | awk '{print $1}'`
My_Jobname=`echo $2 | awk '{print $2}'`
My_Date=`echo $2 | awk '{print $3}'`
# order job now
ctmorder -SCHEDTAB $My_Schedtab -JOBNAME $My_Jobname -ODATE $My_Date -FORCE Y &


Note:
- The script must reside on the CONTROL-M/S machine
- The ampersand (&) at the end of the command is mandatory. This must be present for this solution to work.
- The variable that contains parameters received from SHOUT pgm is $2

Step3:
Job definition
- Goto the "PostProc" tab and define a shout WHEN LATETIME, LATESUB or EXECTIME
- in the Param box put <your value>
- in the To box put "Order_Job"
- in the Message Box put "your_parameters separed by blank" (ie : SCHEDTAB JOBNAME ODATE)

The parameters for the "Order_Job.sh" script in this example.
I hope this help you.

_________________
Best regards

Walty


Top
   
PostPosted: 02 May 2014 10:21 
Offline
Nouveau
Nouveau
User avatar

Joined: 11 Jul 2013 12:00
Posts: 13
Thank you so much. It's much appreciated.

I'm now in the process of testing it in batch. I will let you know.


Thanks!


Top
   
PostPosted: 06 May 2014 8:48 
Offline
Nouveau
Nouveau
User avatar

Joined: 11 Jul 2013 12:00
Posts: 13
When the exectime of JOB_A exceeds a time limit, a job (JOB_C) is ordered in. It worked. The test was successful. Thank you.

This brings up another question.

Can this job that was brought in (JOB_C) be dependent on a file transmission? In other words, Can JOB_C once ordered, check for a file that has either come in or not?


Top
   
 Post subject:
PostPosted: 07 May 2014 7:35 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Jan 2006 12:00
Posts: 473
Yes,

In this case JOB_C must be a filewatcher job (if you want to check a file)
When the JOB_C is ordered, it will be a standard job in your AJF based on your definitions.

_________________
Best regards

Walty


Top
   
 Post subject:
PostPosted: 07 May 2014 5:52 
Offline
Nouveau
Nouveau
User avatar

Joined: 11 Jul 2013 12:00
Posts: 13
Thanks for all the help. I'll read up on the file watcher jobs and see how they're set-up. Thanks!

All the best.


Top
   
PostPosted: 28 Apr 2015 11:54 
Offline
Nouveau
Nouveau
User avatar

Joined: 08 Jun 2007 12:00
Posts: 807
Location: Varese - Italy
The BIM job do this in a flexible manner, defined at "flow side" (the bim job mantain under control the flow were is attached).

The other solution, without BIM, is to use the method well described by Walty (defined at "job side").


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

All times are UTC+02: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