File watcher job went to Success and in 1 sec to autoterminate
search cancel

File watcher job went to Success and in 1 sec to autoterminate

book

Article ID: 231026

calendar_today

Updated On:

Products

CA Workload Automation AE

Issue/Introduction

A filewatcher job went to success when the file arrived but at the same time the job was terminated.
What can you be done to avoid such situation.

Environment

Autosys 12.x
system agent 12.x

Cause

Regardless of the job type you have, FW, CMD or BOX.
If the job has term_run_time set to a value(that represents a number of minutes).
If the job run SUCCESS at the moment term_run_time has been met.
The job can go to SUCCESS and at the same time process the termination.

Resolution

Autosys 12.x and above are multi-threaded.
This was designed to increase performance.
Each Scheduler thread is a task to process job statuses or events. 
This occurrence is not a bug but a coincidence when two circumstances happen at the same time.
When two events occur almost at the same time, two threads will process each one immediately. 

You can either remove the term_run_time or increase the term_run_time value.
Predicting that the job will be completed before the term_run_time is processed.

Another possible solution would be to remove the term_run_time and set the max run time alarm:
https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/workload-automation-ae-and-workload-control-center/11-3-6-SP8/reference/ae-job-information-language/jil-job-definitions/max-run-alarm-attribute-define-the-maximum-run-time-for-a-job.html