We have an Autosys task (let him call it job_a), which has a 3-time dependency, and is also expected to expect the mainframe to complete successfully (job_m, which in our case is always successful). Job_m is launched through the mainframe OPC scheduler, which links the completion of the job to Autosys. It can work at any time between 2am and 6am.
My understanding of how Autosys works is that it writes a record to a table in its database when job_m exits, and when job_a checks its dependencies, it sees the status of job_m in this table. This status will not be automatically cleared. As a result, the work dependency will always be executed after the first successful execution of job_m, although we are only interested in starting job_m 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 solution is to have a job (job_c) that periodically checks the table and only completes if the status of job_m has been 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 job_m status in a table? If not, is there a more effective way to ensure this dependency than described above?