home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!NSCVAX.PRINCETON.EDU!dragon
- From: dragon@NSCVAX.PRINCETON.EDU (Mighty Firebreather)
- Newsgroups: comp.os.vms
- Subject: RE: Submitting Jobs for Last Day of Month
- Message-ID: <0095FABC.93536700.10745@nscvax.princeton.edu>
- Date: 26 Aug 92 15:38:55 GMT
- Sender: usenet@ucbvax.BERKELEY.EDU
- Organization: The Internet
- Lines: 30
-
-
- Jane MacDonald <jmacdonald@mta.ca> writes:
- >
- >I am wondering if anyone has a nifty way to have jobs submit themselves for the
- >last day of the month. Thank-you.
- >
-
- This is almost too easy.
-
- $ THISMONTH=F$CVTIME("TODAY", "ABSOLUTE", "MONTH")
- $ THISYEAR = F$CVTIME("TODAY", "ABSOLUTE", "YEAR")
- $! Adding 31 days to the first of this month takes us to the next month.
- $ NEXTMONTH=F$CVTIME("1-''THISMONTH'-''THISYEAR'+31-", "ABSOLUTE", "MONTH")
- $! The first day of next month, minus one day, is the last day of this
- $! month.
- $ TARGET_DATE=F$CVTIME("1-''NEXTMONTH'-''THISYEAR'-1-", "ABSOLUTE")
- $ SUBMIT /AFTER=TARGET_DATE ...
-
- The last day of next month could be handled in a similar fashion. I
- will leave the handling of December and the new year as an exercise for the
- student.
-
- *************************************************************************
- * *
- * Here, there be dragons! *
- * dragon@nscvax.princeton.edu *
- * *
- * Richard B. Gilbert *
- *************************************************************************
-
-