Generate a helpdesk ticket if job does not start on time
search cancel

Generate a helpdesk ticket if job does not start on time

book

Article ID: 387792

calendar_today

Updated On:

Products

Autosys Workload Automation CA Workload Automation AE - Scheduler (AutoSys)

Issue/Introduction

There is a requirement to generate an incident if a job does not start at its scheduled time.

Environment

AutoSys 12.x, 24.x

Resolution

  1. Ensure MUST_START_ALARM is defined to the helpdesk_alarm_types setting in the Helpdesk Config File.

    helpdesk_alarm_types=JOBFAILURE,EVENT_HDLR_ERROR,MAXRUNALARM,MUST_START_ALARM,MUST_COMPLETE_ALARM,MAX_RETRYS

  2. Example job definition 

    /* ----------------- TestSvcNow_MustStart ----------------- */

     

    insert_job: TestSvcNow_MustStart   job_type: CMD
    command: sleep 60
    machine: hostname
    owner: autosys@hostname
    permission:
    date_conditions: 1
    days_of_week: su,mo,tu,we,th,fr,sa
    start_times: "12:30,12:45,12:50,13:00,13:15,13:30,13:45"
    description: "Test ServiceNow Ticket Generation"
    n_retrys: 3
    std_out_file: "/tmp/TestSvcNow.out"
    std_err_file: "/tmp/TestSvcNow.err"
    alarm_if_fail: 0
    alarm_if_terminated: 0
    must_start_times: "+1"
    helpdesk: y
    helpdesk_template: HelpdeskTemplateForJobStatusFailure
    helpdesk_attr: urgency=3
    helpdesk_attr: impact=3
    helpdesk_attr: priority=5
    helpdesk_attr: caller_id="System Administrator"
    helpdesk_alarm_types: MAX_RETRYS
    helpdesk_alarm_types: MUST_START_ALARM


With the above in place, if the must start time is exceeded, a helpdesk ticket is generated. Below are example log messages that can be seen in the event_demon log.

[02/07/2025 19:30:00]      CAUAJM_I_40245 EVENT: STARTJOB         JOB: TestSvcNow_MustStart
[02/07/2025 19:30:00]      <Event was scheduled based on job definition.>
[02/07/2025 19:30:00]      CAUAJM_I_40136 The current status of job <TestSvcNow_MustStart> is ON_HOLD. Cannot be started.
[02/07/2025 19:31:00]      CAUAJM_I_40245 EVENT: CHK_START        JOB: TestSvcNow_MustStart
[02/07/2025 19:31:00]      <Event was scheduled based on job definition.>
[02/07/2025 19:31:01]      CAUAJM_I_40245 EVENT: ALARM            ALARM: MUST_START_ALARM JOB: TestSvcNow_MustStart
[02/07/2025 19:31:01]      <CHK_START criteria has not been satisfied for JOB: TestSvcNow_MustStart>
[02/07/2025 19:31:01]      CAUAJM_I_61015 Help desk request pending for JOB: TestSvcNow_MustStart RUN_NUMBER: 105320.1 ALARM: MUST_START_ALARM
[02/07/2025 19:31:03]      CAUAJM_I_61017 Help desk request creation successful for JOB: TestSvcNow_MustStart RUN_NUMBER: 105320.1 ALARM: MUST_START_ALARM TICKET_NUMBER: INC0010012 TICKET_ID: 7b41430e83e31210a721cad6feaad33f

Additional Information

Please reference the following for additional information on the above mentioned attributes/settings.