Stopping Autosys file watcher job at specific time

Viewed 11

I am working on below requirement to set up Autosys jobs.

Requirement:

  • Continuously monitor a location for file arrival with interval of 3 minutes between 8 AM to 8 PM
  • Trigger the import job when the file is received and continue to monitor the file till 8 PM
  • File monitoring needs to be stopped at 8 PM

What I implemented:

BOX with run_window: 8:00 - 20:00 , start_mins: "05,10,15,20,25,30,35,40,45,50,55"

File watcher job - term_run_time: 4 , box_terminator: y

Import job: if file watcher runs successfully then import job runs

With the above set up, I am able to achieve below:

  1. When the file is arrived , File watcher job runs to success and triggers import job, box completes as green. same jobs will be loaded as part of the box next scheduled loading time which is for every 5 minutes in this case
  2. If the file does not come, then file watcher job get's auto terminated and terminates the box as well and get loaded as part the box next scheduled loading time (But since I am terminating the file watcher job and box, so it might cause unnecessary alerts in Prod)

if I don't terminate file watcher job for every 4 minutes, it wont stop at 8 PM at the night which I do not want.

so I am just wondering if there is any solution to stop my file watcher job at 8 PM so that I don't have to terminate the file watcher job/box.

1 Answers

The termination after 4 minutes of runtime is the easiest solution.

I would probably take the FT outside of the box so that way your box is not running, and on the success of FT start the box that contains the import. That would be a better solution.

Related