HP OpenVMS Systems

ask the wizard
Content starts here

Delta, Absolute, and Combination Time Formats?

» close window

The Question is:

 
I would like to know how to submit a job to the batch queue to
execute at 4 am the following day.
 
If I use the command 'submit/after=04:0.0.0', and it is after 4 am, the job is
 executed immediately instead of waiting for the next day 4am time.
 
If I use the command 'submit/after=tomorrow:04', and it is after 4 am, the job
 is held until midnight and immediately executes instead of waiting  for
4 am to execute.
 
How should I write the submit statement so that the job is added to the batch
 queue to execute at a particular time on the following day?
 


The Answer is :

 
  Consider using TOMORROW+4:00
 
  In the specific cases cited, "04:0.0.0" is invalid as it includes
  too many dots, while "tomorrow:04" is a valid specification for
  four minutes after midnight tomorrow morning.
 
  A DCL specification of an absolute time uses the following fields:
    [dd-mmm-yyyy][:hh:mm:ss.cc]
 
  The following rules apply when specifying an absolute time:
 
     o You can truncate the date or the time on the right.
     o If you specify both a date and a time, include a colon between
      them.
     o The date must contain at least one hyphen.
     o You can omit any of the fields within the date and time as
       long as you include the punctuation marks that separate the
       fields.
     o A truncated or omitted date field defaults to the corresponding
       fields for the current date.
     o A truncated or omitted time field defaults to zero.
     o If you specify a past time in a command that expects the
       current or a future time, the current time is used.
 
  A DCL specification of a delta time uses the following fields:
    +[dddd-][hh:mm:ss.cc]
 
  The following rules apply when specifying a delta time in DCL:
 
     o You can truncate a delta time on the right.
     o If you specify the number of days, include a hyphen.
     o You can omit fields within the time as long as you include
       the punctuation that separates the fields.
     o If you omit the time field, the default is zero.
 
  In this specific case, you will want to use a combination of an
  absolute time (TOMORROW) and a delta time (+4:00), this is called
  a Combination Time.  The Combination Time permits the following
  two formats:
    [absolute time][+delta time]
    [absolute time][-delta time]
 
  The following rules apply when specifying combination time:
 
     o Precede the delta time value by a plus or minus sign.
     o Enclose the entire time specification in quotation marks
       if a plus or minus sign precedes the delta time value.
     o Omit the absolute time value if you want to offset the
       delta time from the current date and time.
     o Specify date and time information as completely as possible.
 
  A section on entering Dates and Times as Values is included in the
  OpenVMS User's Guide, part of the OpenVMS documentation set.  The
  documentation -- including the User's Guide -- is available at the
  OpenVMS website, on CD-ROM, and in hardcopy.
 

answer written or last revised on ( 9-MAR-2001 )

» close window