Hello,
I'm trying to monitor queues for specific tickets and email the user only when a new ticket is created.
But to complicate things, I need to think how I'm going to deal with repeat emails on the same ticket until it is closed.
Meaning, script runs every 15 minutes, if it finds a ticket and report on it, then the next 15 minutes it will report the same ticket and I don't want that.
The script itself is functioning :), as in ... sqlplus query finds tickets and the script emails them however, it emails all the tickets and only want to see the ticket that was create in the last 15 mins.
really confused ... or I'm going about this wrong way .....
My sqlplus query is
-- Query output formatting
SET HEADING ON
SET FEEDBACK OFF
SET PAGESIZE 0
SET LINESIZE 500
-- This is the actual query
SELECT TICKET_NUMBER,
QID,
TO_CHAR (RCD, 'DD-MON-YYYY HH24:MI:SS'),
TO_CHAR (AP_DATE, 'DD-MON-YYYY HH24:MI:SS'),
CCT,
CUSTOMER
FROM VT_TR
WHERE cct like 'L1L%' and qid in ('D', 'E', 'F','S', 'Z')
or cct like 'L2L%' and qid in ('D', 'E', 'F','S', 'Z')
AND (RCD) > RCD -15/(24*60)
ORDER by rcd;
exit;
and the AWK code is ...
awk '{print "Ticket #: " $1}
{print "Queue : " $2}
{print "Recieved Date : " $3}
{print "Recieved Time : " $4}
{print "AP Date : " $5}
{print "AP Time : " $6}
{print "Circuit ID : " $7}
{print "Customer Name : " $8, $9, $10, $11 "\n"}' $FBLOG >$FBLOG.1
Any assistance is greatly appreciated ...
thank you in advance