Hi,

Just a post in order to expose a solution in order to force the starting/stopping of a running job.

Force the job’s starting via DQL:

  • Execute the following query:
    UPDATE dm_job OBJECTS set run_now=true, set a_next_invocation=DATE(NOW) WHERE object_name = '[job_name]'; 
    

  • Check the log and the automatically setting to initial value for the next invocation date by AGENT_EXEC process depending on the scheduling parameters of job :
    SELECT r_object_id, a_last_invocation, run_now, a_next_invocation from dm_job WHERE object_name = '[job_name]';
    ## LOGS
    SELECT   * FROM   dm_sysobject WHERE   folder('/Temp/Jobs/[job_name]') ORDER BY   r_creation_date DESC;
    

 

Force the job’s stopping:

  • Get the process id, by running the DQL (dm_job.a_last_process_id):
    SELECT r_object_id, a_last_invocation, a_last_process_id, a_last_completion, a_special_app, r_lock_date, is_inactive, run_now, a_next_invocation, a_current_status, a_last_return_code, i_is_reference, i_is_replica dm_job where object_name='[JOB_NAME]';
    
    r_object_id = 080xxxxxxxxxxxx9	
    a_last_invocation = 01/01/2016 10:00:56	
    a_last_process_id = 8976	
    a_last_completion = nulldate	
    a_special_app = agentexec	
    r_lock_date = 01/01/2016 10:00:52	
    is_inactive = 1	
    run_now = 0	
    a_next_invocation = 02/01/2016 09:55:42	
    a_current_status = STARTED	
    a_last_return_code = 0	
    i_is_reference = 0	
    i_is_replica = 0
    
    

  • Kill the process corresponding via the process explorer (Example: In Windows Task Manager, the process name must be “dm_agent_exec.exe”) or with a command instructions (Windows: taskkill /pid 1234).
    In some cases, the job goes on to be executed despite of process killing. The job is unlock and without application specified of locker:
    This situation is precised in the “a_current_status” field.
    + “a_current_status” = “The job object indicated the job was in progress, but the job was not actually running. It is likely that the dm_agent_exec utility was stopped while the job was in progress.”.
    + “r_lock_date” = nulldate
    + “a_special_app” = ”
    => The unique solution is to restart the Java Server Method via the CMD (D:\Documentum\jboss7.1.1\server\stopMethodServer.cmd) OR Services Manager.
     
  • Unlock the job via the API commands:
    dump,c,[JOB_OBJECT_ID]
    unlock,c,[JOB_OBJECT_ID]
    

  • Reset some execution-related job’s fields via DQL query (application/launcher of job, current status, ):
    update dm_job objects set a_special_app='', set a_current_status='FAILED', set run_now=FALSE where object_name='[JOB_NAME]';
    

    The job is unlocked now and ready to be run again.

    SELECT r_object_id, a_last_invocation, a_last_process_id, a_last_completion, a_special_app, r_lock_date, is_inactive, run_now, a_next_invocation, a_current_status, a_last_return_code, i_is_reference, i_is_replica dm_job where object_name='[JOB_NAME]';
    
    r_object_id = 080xxxxxxxxxxxx9	
    a_last_invocation = 01/01/2016 10:00:56	
    a_last_process_id = 8976	
    a_last_completion = 01/01/2016 15:03:48	
    a_special_app = 
    r_lock_date = nulldate
    is_inactive = 1	
    run_now = 0	
    a_next_invocation = 02/01/2016 09:55:42	
    a_current_status = FAILED
    a_last_return_code = 0	
    i_is_reference = 0	
    i_is_replica = 0
    

That’s all!!

Huseyin