We have an Autosys job (let's call it job_a) that has a 3am time dependency and is also supposed to await successful completion of a mainframe job (job_m, which in our case is always successful). Job_m is run via the OPC scheduler on the mainframe, which communicates job completion to Autosys. It can run any time between 2am and 6am.
My understanding of how Autosys works is that it writes an entry into a table in its database when job_m completes, and when job_a checks its dependencies, it looks in this table to see the status of job_m. This status is not automatically cleared. As a result, the job dependency will always be met after the first ever successful run of job_m, even though we are only interested in job_m runs on the same day.
Day 1 4am: job_m completes Day 1 4:01am: job_a runs, since Day 1 4am run of job_m was successful Day 2 3am: job_a runs, since Day 1 4am run of job_m was successful Day 2 5am: job_m completes
Our current proposed workaround is to have a job (job_c) that periodically checks the table and only complete if the status of job_m was changed in the last 6 hours.
Day 1 3am: job_c starts, sees no status change for job_m within the last 6 hours Day 1 4am: job_m completes Day 1 4:01am: job_c completes Day 1 4:02am: job_a runs following completion of job_c Day 2 3am: job_c starts, sees no status change for job_m within the last 6 hours Day 2 5am: job_m completes Day 2 5:01am: job_c completes Day 2 5:02am: job_a runs following completion of job_c
Is there an Autosys command that can be used to reset the status of job_m in the table? If not, is there a better method of enforcing this dependency than the one outlined above?