How long does a control-M job stays in waiting state for the pre-requisites to be met by default? - control-m

If keep active is given as 0, how long the job waits for the pre-requisites to be met?
If keep active is given as 1, how long the job waits for the pre-requisites to be met?
My requirement is job should come into plan on certain time on first day and if pre-requisites aren't met that should go away from plan by the same time following(next) day.

Control-M works around the fundamental concept of New Day Processing (NDP). NDP sets up your scheduled jobs for the upcoming day and does housekeeping on the jobs that were there during the previous "day". The timing of your NDP is set by the CM Admin. Say, for example, your, your NDP is at 8 am and you have a new job that waits until 1 pm, has an input condition and keep active = 0. Should the input condition not show up then your job will be cleared out (unexecuted) at 8 am the next day.
If you have keep active set as 1 (or more) the job will survive NDP and potentially run (upon receiving the input cond) the next day. However it will wait on the from time (1 pm in our example) unless you use the "allow submission past next New Day" option. You can also set a "to" time, which sets the latest possible time for when the job could submit - unfortunately that would also limit you on the "first" day. To cleanup on the second day (in the way you describe) I think you'd have to create another job to manipulate the original (via ctmpsm ot the api).

Related

Is there a way to programmatically determine how long a conference room resource has been available for a given time slot?

For example, let's say a conference room was booked for a 12-1pm meeting. At 9am that same morning, a user cancelled that meeting, freeing up the conference room. Is there any way to programmatically run a script which would indicate, if run at 10am, that the room had become available one hour ago?
If you retrieve the event that was cancelled via Events.get, you can get the updated time field as a response, which, in case the event got cancelled, equals the time the event was cancelled. Then, the script can calculate the difference between current time and the time it got cancelled.
You could also use Freebusy to make sure that no one created another event after the previous one got cancelled and that the resource is free for that time.
Update
If you want to know for how long a certain conference room has been free for a certain time, you can:
Get the list of events related to this resource via Events.list, including the ones that were cancelled (set showDeleted to true) to achieve that.
Check if there are any events whose scheduled time matches the time you want to look for (fields start and end).
If any of these events matches, you can calculate, for that event (and in case the event got cancelled and the resource is indeed free - event status is cancelled), the difference between current time and the time the event got cancelled (by checking the field updated).
I hope this is what you wanted.

Control-M avoid cyclic job from run before prev day's complete

I have a Control-M job that runs every 20 min. Everything works great during that day's run. The issue is when we auto-order the next days jobs. If the current day's jobs are running we get 2 copies of the jobs running at the same time.
Is there a way to not start the new job if the previous day's job is executing?
The job starts every 20 minutes, but how long does it run? Set the end window for "submit between" time a few minutes before the new day build.
Let's say your new day builds at 0400. Since the job is intended to run every 20 minutes, you can have it run as late as 0340. Set the "to" time in Activity Window to 0340 and the job won't autosubmit after that time. The new day will build at 0400 and the new version of the job will start then - 20 minutes after the previous start.
You can also add a control resource to the job to prevent two of them from running at the same time. I don't know another way to do it. That's not a can of worms I'd open unless the activity period settings just won't work the way you want them to.
If you're referring to last day's job execution bleeding into current day, causing resource contention, your best bet (as Rob pointed out) is to define a resource with max count of 1 to be required by the job, so next day job instance cannot start until prev day job completes and release the resource. Alternatively you can have the job post a Condition for order date + 1, and have order date condition also be an In condition for the job.

i want execute my previous days unexecute job first rather than today in Control-M

i am trying ordering my jobs into planing until jobs gets success,but when previous days jobs for that particular CTM table run then only today order jobs need to be run , i have added keep active for 10 days for each job.
thanks in advance
You can try adding an IN-CONDITION of the same job with PREV date, so that todays job will run only when yesterday's job has completed its run successfully.
If you want to run todays job even when yesterdays job fails, you can add a DO-STEP on failure, to create a condition which can be used by todays job to start running.

NetSuite case ageing notification

Below question is related to NetSuite Support Module.
We want to send an email notification to the support rep assigned to the case if the time since last modification of the case has exceeded 48 hours. This notification needs to be sent for each case as soon as it ages over 48 hours since last modification,
I tried a saved search notifiaction, but that does not work as the case which exceeds 48 hours is not a new record.
I am not able to figure out what the trigger would be for a workflow or a script to make this notification work.
Any ideas?
Thanks
Use a workflow
make initiation "Scheduled"
use a condition that the Case is not closed or whatever works for you
under Saved Search set up a search that ids cases older than 48 hours
the saved search will run every half an hour and pick up your aging cases.
To finish this you need to decide if the same case will get another every half an hour until it's been dealt with. If so the workflow can end when the email goes out. If not then the workflow needs to go into some state waiting for the next escalation or waiting for some delay until you can ping the assignee again.

Running an Alfresco Action after one week a rule is executed

I wrote a script to run for an Alfresco rule. but I want the script to run after specific time ( I need the script to run after 1 week). any solution?
I read about Scheduled_Actions , is this feature useful?
Yes, in fact a Scheduled Action is likely your only option for for running something after a certain amount of time has elapsed.
At a high level your solution should look something like:
Your rule sets some aspect/property on the relevant node, say ruleDate, which is the date the original rule ran.
A scheduled action runs every day and detects nodes with a ruleDate 7 days or more in the past.
The scheduled action does whatever changes are required.
The scheduled action removes the ruleDate aspect/property.
Yes it is useful. You need to set up cron job to run scheduled task.
You can find more details on this link.

Resources