IBM Support

How to monitor for a specific time every day?

How To


Summary

There's an event (job, message, process, or task) that runs every day, and you want to detect when this event runs earlier than a specified time. How to detect this?

Objective

For example, you have an SAP job that is supposed to run every day at 20.10 pm, and you want to detect whether this job has started earlier every day. How to do this?

Environment

ITM 6.3 with ITM or ITCAM agents

Steps

The 'R/3 Batch Jobs' has a 'Start Time' attribute, which you want to use for the monitoring of the start time of a specific job. Using the 'Compare Date and Time' function would look straightforward, but as 'Start Time' is a TIMESTAMP attribute, and it expects a date+time, it cannot have time only and needs a date as well.
Therefore, we would need another approach.

In fact, as it is a TIMESTAMP attribute, it has this format under the covers:

Standard 16-character date/time format (CYYMMDDHHMMSSmmm), where:

C Century (0 for 20th, 1 for 21st)
YY Year
MM Month
DD Day
HH Hour
MM Minute
SS Second
mmm Millisecond

Knowing this, you could adapt your situation to use the 'Return a subset of the string' function, with the '<' (less than) operator.

20:10:00 corresponds to HHMMSS, and HHMMSS starts at the 8th position in the CYYMMDDHHMMSSmmm string.

So, in the situation you could specify to start at the 8th position, and define your condition 'less than 201000000', which would match any timestamp that is earlier than 20:10:00.

 

Your situation should look like this:

*IF *SCAN R/3_Batch_Jobs.Job_Name *EQ ZAUP *AND *STR R/3_Batch_Jobs.Start_Time *LT 8,201000000

Document Location

Worldwide

[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS3JRN","label":"Tivoli Composite Application Manager for Applications"},"ARM Category":[{"code":"a8m50000000KzGGAA0","label":"ITCAM-for-Applications->SAP Agent->Usage ksa"}],"ARM Case Number":"TS003240929","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Product Synonym

itmv6;itcam

Document Information

Modified date:
28 September 2020

UID

ibm11274434