Autosys job to start after another job with any status - autosys

I need to run job after another job with whatever status the previous job finished.
So far I use
condition: success(x) or failure(x)
can it be written for any status?
I dont know the exact version of the autosys. But not the very latest.

condition: done(x)

Related

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.

Is there a way to revive a coordinator?

An oozie coordinator we own has been killed for operational reasons about a week ago. The cluster is now back up and running and ready for business. Can we revive it somehow so it will keep its run history and backfill all missing runs, or do we have to schedule a brand new one?
oozie job -resume xxxxxxx-xxxxxxxxxxxxxxx-oozie-oozi-C doesn't error out, but it also doesn't change the status of the coordinator back to RUNNING.
Have you tried out the killed -> ignored -> running transition? Based on the docs it should be possible.
It's a two step process: first one is based -ignore, second one is -change.
I've never tried to do this though :)

Control-M Job Execution status

Is there any way in Control-M to pass the execution of the job without running the script?
Suppose i have passed all the parameters required for execution of job i.e. File Path, File Name , Node Id, Parameters but i want to run the job as dummy one but still want to successfully execute it and make it in green status.
Can we specify any command in Job Scheduling?
Yes, select 'dummy' as type of job and there is no need to pass command line to dummy job. It will get completed as soon as it gets the resource and you can use it as trigger for another job.
Regards,
Sahil Kondel
You can force set job OK in post-processing to get Green/Success status

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.

Autosys failing a job if the dependent job doesnot complete/success before a particular time

Autosys job retail_daily_job runs at 8:00 GMT. It is dependent on success of runner_daily_job.
Condition is If runner_daily_job is not success by 7:30 GMT, then status of retail_daily_job should be made to fail.i.e retail_daily_job should fail.
How to do this in autosys? what is the command to be used in jil file?
Thanks and Regards,
Simi
Not easy to do. Autosys doesn't support a negation condition for example NOT SUCCESS. I would try creating a job that would run at 0730 that would change the status of the retail_daily_job job to FAILURE if the runner_daily_job is FAILURE or TERMINATED or RUNNING.
Agree with clmccomas, not easy due to lack of certain operators.
We get around this by having our jobs create "status" files that other jobs can reference if need be. I've found that trying to parse/depend on output from autorep can be troublesome but is also doable. So we usually have a job status directory and create dated folders
/yyyymmdd/jobname_
The your command job would check the existing status file that's there. Often you may only want to write the status on completion.
The suggestion of having a job to alter statuses might work out well too.
Itseems like you are making the situation a bit complex.
If you want retail_daily_job to run based on the success of runner_daily_job, then simply put the condition as success(runner_daily_job).
So as you said if runner_daily_job is not success by 7:30 GMT (which means failure), then automatically the status of retail_daily_job will become to fail.
Hope this clarifies your question.

Resources