Can I have Autosys send an alert if a job doesn't end at a specific time? - autosys

I have a box job that is dependent on another job finishing. The first job normally finishes by 11pm and my box job then kicks off and finishes in about 15 minutes. Occasionally, however, the job may not finish until much later. If it finishes later than 4am, I'd like to have it send an alert.
My admin told me that since it is dependent on a prior job, and not set to start at a specific time, it is not possible to set a time-based alert. Is this true? Does anybody have a workaround they can suggest? I'd rather not set the alert on the prior job (suggested by my admin) as that may not always catch those instances when my job runs longer.
Thanks!

You can set a max run alarm time which will alert if that time is exceeded

We ended up adding a job to the box with a start time of 4am that checks for the existence of the files the rest of the job creates. We also did this for the jobs predecessors to make sure we are notified if we are at risk of not finishing by 4am.

Related

Axon: Deadline vs EventScheduler

Hello I'm struggling to come up with the distinction between the DeadlineManager implementation of scheduling future events and EventScheduler and what is the best use case for either.
Say I need to schedule a task to be performed in 24 hours based on a command that happened today. Between now and then another event or command could occur that makes the scheduled event obsolete so now I need to cancel the scheduled event.
Can I use either interchangeably? If not - in this scenario what is the best choice or is there not enough information? What would inform my decision to use one over the other?
The main difference between scheduling an event or a deadline is what you want to happen when your scheduled time has passed.
When you schedule an event , that event will always be added to the eventstore after the scheduled time has passed.
When you schedule a deadline, no event will be added directly, but instead a DeadlineHandler annotated function will be called, in which you can then decide based on the current state of the aggregate or saga, what you want to do (if anything). So unless you apply an event yourself in the deadline handler, there will be no interaction with the eventstore.
Note that both can also be cancelled before the scheduled time has ended, using the ScheduleToken returned when scheduling an event, or using the deadineId and its name in the case of a deadline.
Some further information can be found in the reference guide:
https://docs.axoniq.io/reference-guide/configuring-infrastructure-components/deadlines
https://docs.axoniq.io/reference-guide/implementing-domain-logic/complex-business-transactions/deadline-handling

Control-M: it is possible if first job fails to continue running

I have several jobs than will run in sequence. It is possible to create a dependency between them only for completion, but not that the prior job has to complete successfully?
If a job fails this should remain red and go to the next job and continue running.
It is mandatory that this jobs to run in sequence and not in paralel.
As Mark outlined you can simply create an On-Do action within the parent job to add a condition when the job ends Not OK. The parent job will still go red and the successor job will kick off.
See below for an example:
yes, on the actions tab you create and On/Do step and say when Not OK the job should add the output condition. In this way the next job will run (in sequence) regardless of what happens to the predecessor job.

Firebase database triggers execution delay

I am using Firebase's cloud functions to execute triggers when a client adds something to the database, but it seems like these triggers take long time to execute.
For example, I have a trigger that adds a creation date to a post whenever a post is added to the database, and it takes like 10 seconds to complete.
Also, I have larger triggers that take even longer.
Is there like a "best practice" I am missing? Am I doing anything wrong?
I've found that the reason that Cloud Functions sometimes takes time to respond, is because they have a "warm up" period, meaning that the first time you call a cloud function it begins to warm up, and it won't be fully responsive until it is warm.
After it warms up, it will be as responsive as you would expect.
The reason for this behavior is resource resource balancing - If you don't use a function for some time, it will shut down and clear resources so other functions will be more responsive.

Autosys box job not finishing

I am new to Autosys and facing difficulty setting up some jobs. I have a box job containg a few command jobs. One of those command jobs may or may not run. The problem is when this job doesn't run(it remains in activated state), it keeps the box running. I have to terminate this job or the box every time such situation arises.
Is there a way to handle this?
Thanks
The answer depends on how your jobs are supposed to work, so posting JIL or a more detailed description would help, but:
You can add a "box_success" JIL attribute on your box job to define conditions that will cause the box to complete even without all the jobs running or completing.
You could consider moving the optional job outside of the box so that this issue goes away. But consider that the box could then complete while the optional job is running so make sure that you don't then have jobs running out of sequence or overlapping when they shouldn't.

Time based triggers in Windows Workflow Foundation

I'm looking at using Windows WF to implement a system, which includes the need to support workflows that have either transitions or activities that need to be scheduled to execute at either a certain date/time in the future, or after a certain period of time has elapsed.
I found a question along these lines already:
Windows Workflow Foundation - schedule activities to run at certain times
Which suggests using the Delay task and calculating the duration of the delay in order to proceed at the required time. I have a few additional questions however, but don't have enough reputation to add comments so I'm posting a secondary question:
How can I implement it such that it can recover from a crash? For example, let's say the task is currently in the delay task and the process hosting the workflow engine crashes. When it is restarted, will it resume waiting in the delay task, and trigger at the time required? Do you have to do something special to get this to happen?
Another question is, again let's say a workflow instance is already mid-way through the delay task. At that point, you suddenly need to alter the time/date at which the workflow progresses to the next activity/task. Is it possible to programmatically update the duration on the in-play delay task to effect this?
If you store started instances in the SQL Store, you can add Persist activity each time you want to force save it. After crash activity will continue from last persist.
You can replace single big Delay with While cycle. In condition you check if you need to delay or not, in body you place Delay activity with short interval. You can add persist after that short Delay and instance will not wait full time again after crash (it depends on While condition, you need to store somewhere state of your instances. For example in variable).

Resources