Control-M job stuck
I wrote this article following my experience with Control-M. I'm not really an expert, and this article is relative to Control-M version 9.0.19.
What do I mean as job stuck?
Stuck jobs refer to Control-M jobs that remain in the schedule for days without a underlying process. There are several cases, they will be documented one by one as they arise.
Job in hold in Wait Condition
This is the seemingly simplest case. A job on hold can be deleted, and the problem is solved.
Job in running
If the job has remained in running, a kill probably will not work. There is therefore a script to end a job of this type on the server side.
To do this, you need to log in to the active Control-M server and run the appropriate script.
By selecting the job in question, the Order ID must be identified, which is the unique identifier to act on the job that we find in monitoring. This information can be found in the 'Run Information' section. For example, in the following case:
The Order ID is 14nfw, and this notation works well for our purposes.
To run the interested script, open a command prompt on the server as administrator. In this specific case, you need to adjust the following command to your path:
"C:\Program Files\BMC Software\Control-M Server\bmcperl\perl" "C:\Program Files\BMC Software\Control-M Server\ctm_server\scripts\force_end_job.pl" 14nfw
Interactively, confirmation will be requested, or an error will be returned.
Attention: ending the job in this way is equivalent to a kill, so a Control-M alert will be generated to be managed.
Job in running in hold
End the job as in the previous case. Additionally, the job must be freed (free).
Cyclic job running in hold
It's the most annoying case, because in many cases if we were to simply do a free, the next execution would start. In this case, before proceeding with the steps from the previous case, the job schedule needs to be modified by limiting the execution interval to a time range that does not include the period during which we are operating.
