Thanks... about the time I sent my original post it occurred that I could 
simply create a new schedule, to run at 16:00, that issues "delete schedule 
<....> type=a".

So simple I didn't see the solution.

Thanks again.

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L@VM.MARIST.EDU] On Behalf Of Thomas 
Denier
Sent: Tuesday, October 21, 2014 10:29 AM
To: ADSM-L@VM.MARIST.EDU
Subject: Re: [ADSM-L] Script snipet for "current hour"

You can run something like:

select database_name from db where hour(current timestamp)>16

The return code will be 0 if the hour is greater than 16 and 11 otherwise.

Thomas Denier
Thomas Jefferson University Hospital

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L@VM.MARIST.EDU] On Behalf Of 
Vandeventer, Harold [OITS]
Sent: Tuesday, October 21, 2014 11:20 AM
To: ADSM-L@VM.MARIST.EDU
Subject: [ADSM-L] Script snipet for "current hour"

Does anyone have a bit of script code that evaluates the "current hour" when 
the script is running?

Something like
                IF SELECT HOUR(CURRENT_TIMESTAMP) FROM LOG > 16 GOTO ...

I've poked around ADSM.QuickFacts and see some potential hints.  SELECT 
HOUR(CURRENT_TIMESTAMP) FROM LOG will return the current hour, but I can't get 
an if test to evaluate that hour saved as a script.

My goal: A script runs and it schedules a secondary script to run at a future 
time.

When the secondary script runs, it tests for various conditions (active node 
sessions, reclamation, etc.) and MIGHT reschedule itself for "STARTT=NOW+00:15".

But, that secondary script will ideally also test for the time that it started. 
 If the start time is past a given time of day (say 16:00), I want the script 
to skip its intended purpose and delete the schedule that fired it off.
The information contained in this transmission contains privileged and 
confidential information. It is intended only for the use of the person named 
above. If you are not the intended recipient, you are hereby notified that any 
review, dissemination, distribution or duplication of this communication is 
strictly prohibited. If you are not the intended recipient, please contact the 
sender by reply email and destroy all copies of the original message.

CAUTION: Intended recipients should NOT use email communication for emergent or 
urgent health care matters.

[Confidentiality notice:]
***********************************************************************
This e-mail message, including attachments, if any, is intended for the
person or entity to which it is addressed and may contain confidential
or privileged information.  Any unauthorized review, use, or disclosure
is prohibited.  If you are not the intended recipient, please contact
the sender and destroy the original message, including all copies,
Thank you.
***********************************************************************

Reply via email to