How can we update Autosys jobs defintions for all jobs within a group?
search cancel

How can we update Autosys jobs defintions for all jobs within a group?

book

Article ID: 279314

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

We need to update the "Send to machine" attribute for all jobs in Group: TST

How we can do this within Autosys, or how export export a file with the JIL's for them so that we can update with the new machine and then import to update them all?

Resolution

There is an option that you can specify to display jobs by group using the -B parameter.

Example:  autorep -B TST (where TST is the name of the group) will print out all of the jobs that are contained within the TST Group by job definition.

[autosys@localhost tmp]$ autorep -B TST

Job Name                                                         Last Start           Last End             ST/Ex Run/Ntry Pri/Xit
________________________________________________________________ ____________________ ____________________ _____ ________ _______
test_1                                                           02/14/2024 16:30:01  02/14/2024 16:30:01  SU    59742/1  0
test_2                                                           02/14/2024 16:30:01  02/14/2024 16:30:01  SU    59739/1  0
test_3                                                           02/14/2024 16:30:01  02/14/2024 16:30:01  SU    59744/1  0
test_4                                                           02/14/2024 16:30:00  02/14/2024 16:30:01  SU    59736/1  0
test_5                                                           02/14/2024 16:30:01  02/14/2024 16:30:01  SU    59740/1  0
test_fail_1                                                      02/14/2024 16:30:01  02/14/2024 16:30:01  FA    59741/1  1
test_fail_2                                                      02/14/2024 16:30:00  02/14/2024 16:30:00  FA    59737/1  1
test_fail_3                                                      02/14/2024 16:30:01  02/14/2024 16:30:01  FA    59745/1  1
test_fail_4                                                      02/14/2024 16:30:00  02/14/2024 16:30:00  FA    59738/1  1

 

==============

Steps: Using the TST group as example:

  • autorep -B TST -q > /tmp/TST_GROUP.JIL will give you all of the job definitions for group_name and direct it to file.
  • Open the TST_GROUP.JIL file for editing and make your global edit to change the machine details.
  • Be sure to change all occurrences of insert_job to update_job or you will get error indicating job already exists.
  • Once you've verified your changes, import them using jil
    jil < /tmp/TST_GROUP.JIL
  • You'll receive confirmation message indicating whether the update was successful or failed for each job to be updated.
  • In case of update failures, review your JIL for any typos/errors for any job that the error was generated.

Additional Information

Reference the autorep command in the documentation for details on additional parameters.