automationautosys

Can I create One Box Job inside another box job in Autosys by JIL


I want to write a JIL file in which I want One major box then inside this box job another box job and then I want to write a command Job.

I haven't been able to find the syntax and also Is it possible to write one box job inside another box job or not.


Solution

  • Consider the following names:

    Major_Box - the parent box
    Child_Box - the child box
    Job_A - CMD job under the child box

    Sample JIL:

    insert_job: Major_Box
    job_type: BOX
    owner: xyz
    date_conditions: 1
    days_of_week: all
    start_times: "06:00"
    timezone: IST
    
    insert_job: Child_Box
    job_type: BOX
    box_name: Major_Box
    owner: xyz
    date_conditions: 1
    days_of_week: all
    start_times: "06:15"
    timezone: IST
    
    insert_job: Job_A
    job_type: CMD
    box_name: Child_Box
    command: bash /absolute_path/script_name.sh
    owner: xyz
    machine: hostname
    date_conditions: 1
    days_of_week: all
    start_times: "06:30"
    timezone: IST
    

    Here,

    Major_Box would be triggered at 6:00, it would activate the Child_box but not trigger it.

    At 6:15 the Activated Child_Box would be triggered as the time condition is true, thus activating the Job_A.

    At 6:30 the activated Job_A would trigger running the commands as mentioned.

    Also, you are include condition of preceding job/box

    condition: Success(Another_Job)
    

    Hope this helps. Let me know if you need more. Good Luck