AutoSys box success condition - Successful as long as sub-box was not a failure - autosys

AutoSys 11.3
I have a top-level box (Box-A) that runs every 15 minutes. It has multiple jobs plus Box-B.
Box-B (a member of Box-A), contains a file watcher job, and a script job.
Box-B will terminate after 14 minutes, if still running (IE, file watcher didn't find the file).
I would like Box-A to show ,uccess as long as Box-B doesn't fail. Put another way, if Box-B, succeeds or is terminated. AND all the other jobs Succeed, Box-A should report Success.
Is this possible?

Related

Stopping Autosys file watcher job at specific time

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:
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
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.
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.

Autosys Can a job run multiple instance at the same time

I am trying to understand autosys job. Suppose I have Job A that runs every 15 minutes. Suppose for some reason if Job A takes more than 15 minutes, will another instance of it run or it will wait for the job to finish before running another instance?
In my experience, if the previous job run is still running, another instance will not run if the next scheduled time comes. The next time the job runs is when the previous run is finished and the next scheduled time comes.
Another user also experienced this according to this answer.
I did not find any AutoSys documentation that officially confirms what happens in this situation, but I guess the best way to find out is to test it on your AutoSys instance.
I have experienced this first hand and can confirm that there won't be two instances in the mentioned scenario. The job will wait on the previous run to complete and will immediately kick off the next instance if the time condition is met before the previous completes.
But this will be the case only when the job is in running state, if the job is in any other state it will kick off based on the given start_time condition.

Oozie job taking longer than scheduled interval

I am scheduling an Oozie MapReduce job to run every 15 minutes. I wonder what would happen if each job will take longer than that set time? Will it result in a job backlog? Or Oozie will create a new task / thread / fork for the new job while the previous one is still running?
Oozie won't run the next job before the previous one is over. If the first job takes more than 15 minutes to execute then the next one will be run after scheduled time. So scheduled time and running time may be different in Oozie.
EDIT:
Anyway, the described behaviour is default only and can be changed. You can set concurrency property from controls block to more than 1, and the next job will be run even the first one is still running. Check my answer on similar question

how to create a wait job in informatica

My requirement is to create a job in informatica which will run for every 15 min and look for a status column in abc table.If it is “Approved” THEN It will exit and kick off the rest of the jobs.
If the status is not approved it will not do anything and run after 15 min.This process wil continue until we have a approval status.
So, No matter what happens in the above two scenarios,This process will run in every 15 minutes.
I have worked on the same requirement in unix using loops and conditional statments but I am not sure how this can be achieved using informatica.Could you please help me on this.
Regards,
Karthik
I would try adding a scheduler that runs every 15 minutes. The best way that I've found to "loop" sessions in Informatica is:
run the session once, check if it failed using conditional links
if it did fail, run a timer task for an amount of time (a minute, an hour, whatever)
then try to run the same session again by copying and pasting the session up ahead of the timer task, and repeat a few times as necessary.
So if you added a scheduler into the mix, you could set the scheduler to have the workflow run every 15 minutes, and have the timer tasks halt the workflow for 4 or 5 minutes each. Then you could use SESSSTARTTIME function in some pre/post-session task to determine when the scheduler will fire off again and simply abort the workflow before that time.

Autosys Email Generation if the job runs more than the time specified

Currenty I have requirement in my enviroment for the autosys email notifition.
Requirement: If the job runs more than the specified time it should trigger an email.
What I am trying is using max_run_alam, but I am not successful.
Lets say i have a job that runs for 10mins(lets say the time as 10.00). i set max_run_alarm as 3. i should get an email at 10.03 where i can goahead and see why the job is running more than the max_run_alarm. if i use max_run_alarm i am able to see in the logs triggering that alarm, but I cannot spend all day monitoring the logs to see which job is taking long as i have many jobs. my question is am i using max_run_alarm in the correct way or is there something else i am missing or is there entirely different way for the emails to generate.
pls advise.
We are using autosys R11 at work. I believe the triggering of emails is already automated in higher versions of autosys, but, in our version, to send automatic emails after a certain time, we create two extra autosys jobs. One autosys job starts at the same time as the job you want to "monitor". This job contains a 'sleep' command. (in your example, the command would be "sleep 180" for the job to run for 3 minutes until completion). The second extra job is the sending of the email and only starts after successful completion of the sleep-job.
To prevent the mail from being send every time the autosys box starts, you have to add your first job as BOX_SUCCESS condition. The sleep-job will run to completion, but the mail-job went from the "ACTIVATED" state to the "INACTIVE" state because the autosys box isn't RUNNING anymore.

Resources