When attempting to update an AutoSys job definition by adding the notification_template attribute, users may encounter an error indicating a conflict with the notification_msg attribute. This occurs because the two keywords are mutually exclusive and cannot coexist in a single job definition. The specific error messages seen are:
CAUAJM_I_50323 Inserting/Updating job: ExampleJob
CAUAJM_E_18965 Error for JOB "ExampleJob". <The JIL keyword "notification_template" cannot be specified together with JIL keyword "notification_msg".>
CAUAJM_E_10302 Database Change WAS NOT successful.
This error prevents the job update from being successful and indicates that the database change was not applied.
* AutoSys Workload Automation
The core of this issue is that notification_template and notification_msg are mutually exclusive JIL keywords. To successfully add notification_template, the notification_msg attribute must first be removed if it's already present in the job definition.
Check Existing Job Definition:
First, query the job definition to confirm if notification_msg is already set. Use the autorep command:
autorep -q -J <jobname>
Look for the notification_msg: line in the output.
Remove notification_msg and Add notification_template:
If notification_msg is present, you must include it in your update JIL with no value (to remove it), and then you can specify the notification_template.
Example Update JIL:
To update a job named ExampleJob, removing notification_msg and adding notification_template along with notification_alarm_types:
update_job: ExampleJob
notification_msg: # This line removes the existing notification_msg
notification_template: "example_template"
notification_alarm_types: JOBFAILURE
notification_alarm_types: MAXRUNALARM
Alternative: Remove and Re-insert Job:
If preferred, you can completely remove the job using delete_job: and then insert it anew with only the desired notification_template and other attributes, ensuring notification_msg is not included.