It is currently 19 Sep 2017 7:20


Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: 23 Jan 2014 6:13 
Offline
Nouveau
Nouveau
User avatar

Joined: 24 Oct 2011 12:00
Posts: 17
Hi all,
Is it possible to keep a job active after a succesfull run for several days? Basically today, we can't rerun a job on Monday morning that was executed on friday evening because all succesfull jobs are removed from the active queue when we do a refresh every day. After the refresh only pending, executing and failed job remain.

Thank you.


Top
   
 Post subject:
PostPosted: 24 Jan 2014 11:02 
Offline
Nouveau
Nouveau
User avatar

Joined: 13 Jun 2007 12:00
Posts: 317
Put the job on hold!


Top
   
PostPosted: 25 Jan 2014 6:20 
Offline
Nouveau
Nouveau
User avatar

Joined: 06 Nov 2008 12:00
Posts: 12
Assuming the job is triggered by an 'in' condition, you could set the job to do a rerun on successful completion - ensuring the initial run cleans up the trigger condition first - the job will then wait until you manually supply the condition some time later.


Top
   
 Post subject:
PostPosted: 27 Jan 2014 3:50 
Offline
Nouveau
Nouveau
User avatar

Joined: 24 Oct 2011 12:00
Posts: 17
Thanks Guys.

Unfortunatly none of the answer are satisfying to me. We are really looking for a way to do this without manual intervention. Meaning, we want to eventually rerun a job on monday that was posted on Friday (it happens only a very limited number of time). Only whenever an issue occured and the job needs to be rerun for that date.

It seems counterintuitive for a widely used scheduler to not be able to rerun a job over the week end on Monday.

Thanks anyway,


Top
   
 Post subject:
PostPosted: 29 Jan 2014 11:04 
Offline
Nouveau
Nouveau
User avatar

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

little suggestion for your issue

Step 1:
Create a script file accessible by your Control-M Server.
This script will invoke the 'ctmpsm' utility

UNIX:
#!/bin/sh
ctmpsm -UPDATEAJF $2 HOLD &


- the ampersand (&) must be present at the end of the command

WINDOWS:
@ECHO OFF
cmd /C ctmpsm -UPDATEAJF %2%


- the /C must be present (open a command shell, run and close it)

Step 2:
Create on your Control-M/Server a <new logical entry> in Shout Destination Tables using <ctm_sys>
- ctmsys
- opt1 (Shout Destination Tables)
- opt1 (Create/Modify a Table)
- Table to create/modify or 'q' to quit [SYSTEM]: <ENTER>
- This table is currently active. Do you want to continue (y/n) [n]: y <ENTER>
- Enter Option: n <ENTER>
- Dest. Type: p <ENTER>
- Address Type: s <ENTER>
- Logical Name:HOLD-JOB<ENTER>
- Physical Name:/home/ctmuser/scripts/hold-job.sh (full path name)
- Press q to exit from the ctmsys menu

Step 3:
Define in your job a shout Message
- In the PostProc tab define a shout when OK or NOTOK
- In the Shout Destination put "HOLD-JOB"
- In the Message put "%%ORDERID"

This workaround steps enable Control-M/Server to automatically HOLD in the AJF the job referenced by %%ORDERID when the status for this job is OK or NOTOK.

_________________
Best regards
Walty


Top
   
 Post subject:
PostPosted: 29 Jan 2014 3:05 
Offline
Nouveau
Nouveau
User avatar

Joined: 24 Oct 2011 12:00
Posts: 17
Ok Got that. Thanks.
Now, on Monday morning, I'll have all my jobs on hold from Friday night.

Chances are, I won't need to rerun any. SO my guess is that when the time for CM refresh comes, I have to execute a script that will remove all scripts on hold from the AJF. Would that work?

It's sounds heavy, but at least it's a valid option.


Top
   
 Post subject:
PostPosted: 04 Feb 2014 7:51 
Offline
Nouveau
Nouveau
User avatar

Joined: 07 Jan 2010 12:00
Posts: 149
GrandSteph,
We adressed this kind of issue in one of the major telephone company in France. Customer wanted to keep all jobs under control until a consistent set of job (here the management unit was the controlm APPLICATION name).
All jobs were defined with a MAXWAIT = 99n, which means that automatic cleanup of the AJF is not automaticamlly carried out and that the modification is to be done manually.
Of course, « manually » was not (and still is not) my concern. To address the issue, we created a standard script which updated the MAWXWAIT field on the AJF using a standar SQL request, like « updatre CMR_AJF set MAXWAIT=1 where APPLIC=’appli name’ and ODATE=’yyyymmdd’.
As a result, the jobs will be removed from AJF at the next newday procedure.
This update job was the very last one on the global application workflow.
Note that the update is not propagated on the EM GUI unless you hold/free the upddated jobs. However, the update is reflected on the controlm database ; you can check it using ctmpsmor SQL, and the AJF cleanup is based on the contents of the server database, not the EM one.

Cheers
Nicolas Mulot


Top
   
 Post subject:
PostPosted: 04 Feb 2014 2:54 
Offline
Nouveau
Nouveau
User avatar

Joined: 24 Oct 2011 12:00
Posts: 17
That is smart.

Thank you, will try that.


Top
   
 Post subject:
PostPosted: 05 Feb 2014 7:42 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Jan 2006 12:00
Posts: 473
You can also see this topic

_________________
Best regards

Walty


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 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