A job receives an EVENT_HDLR_ERROR alarm when it finishes a run that requires the Scheduler to generate a new round of dates for an extended calendar that is used by the job. The following sequence of messages appears in the Scheduler log when processing the completion event for the job...
[12/14/2022 17:03:55] CAUAJM_E_10121 Failed to calculate 'next_start' for Job: jobA
[12/14/2022 17:03:55] CAUAJM_E_40197 Error evaluating next start time for job <jobA>. Cannot reschedule the job.
[12/14/2022 17:03:55] CAUAJM_I_40245 EVENT: ALARM ALARM: EVENT_HDLR_ERROR JOB: JobA
[12/14/2022 17:03:55] <An error occurred while processing event <PRD17c7a3f00> for job [JobA 426797.374520582.1].>
A failed query also can be observed in the Scheduler log from when the Scheduler tries to insert new dates for the extended calendar into the ujo_calendar table...
[12/14/2022 17:02:54] CAUAJM_E_18416 Event Server: <XXXXX> Failed Query: <INSERT INTO ujo_calendar (name,cal_id,day) VALUES ('calendar_name',70,TO_DATE('12/14/2022 00:00','MM/DD/YYYY HH24:MI'))>
[12/14/2022 17:02:54] CAUAJM_E_18402 ORA-00001: unique constraint (AEDBADMIN.XPKUJO_CALENDAR) violated
As a result, the job does not get scheduled for its next start time. Also, any downstream jobs that have a dependency on the job receiving the error are not triggered.
Release : 12.0/12.0 SP1
The problem occurs when calendar entries exist in the database for a standard and extended calendar that have the same name. While it is not possible to initially define both a standard calendar and extended calendar with the same name, there two known autocal_asc usages that would result in duplicate entries. They are...
1. An extended calendar already exists and autocal_asc is run with input redirection to add dates to that extended calendar name. That should be rejected with a message saying that you cannot add dates to an extended calendar. However, it creates new standard calendar entries in ujo_calendar with the same name.
2. And extended calendar already exists and autocal_asc -I is run to import new standard calendar entries using the force option (-F) and the same calendar name. This should delete the existing extended calendar and create a new standard calendar. Instead, it creates the new standard calendar but leaves the extended calendar in place.
A fix was put into AutoSys 12.1 to prevent the two known scenarios that would result in duplicate entries. For earlier releases, manual action will need to be taken.
This query will identify calendars that have both standard and extended calendar entries in ujo_calendar...
select distinct(name) from ujo_calendar where cal_id=0 AND name in (select name from ujo_ext_calendar);
To delete these duplicate entries, just run this delete sql with the same where clause...
delete from ujo_calendar where cal_id=0 AND name in (select name from ujo_ext_calendar);
That will delete the standard calendar entries and leave the extended calendar entries.
If there are any jobs that had the EVENT_HDLR_ERROR issue, you will need to issue an update_job to them to get them back on schedule.