home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / vms / 14203 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  1.7 KB

  1. Path: sparky!uunet!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!NSCVAX.PRINCETON.EDU!dragon
  2. From: dragon@NSCVAX.PRINCETON.EDU (Mighty Firebreather)
  3. Newsgroups: comp.os.vms
  4. Subject: RE: Submitting Jobs for Last Day of Month
  5. Message-ID: <0095FABC.93536700.10745@nscvax.princeton.edu>
  6. Date: 26 Aug 92 15:38:55 GMT
  7. Sender: usenet@ucbvax.BERKELEY.EDU
  8. Organization: The Internet
  9. Lines: 30
  10.  
  11.  
  12.     Jane MacDonald <jmacdonald@mta.ca> writes:
  13. >
  14. >I am wondering if anyone has a nifty way to have jobs submit themselves for the
  15. >last day of the month.  Thank-you.
  16. >
  17.  
  18.     This is almost too easy.
  19.  
  20. $    THISMONTH=F$CVTIME("TODAY", "ABSOLUTE", "MONTH")
  21. $    THISYEAR = F$CVTIME("TODAY", "ABSOLUTE", "YEAR")
  22. $! Adding 31 days to the first of this month takes us to the next month.
  23. $    NEXTMONTH=F$CVTIME("1-''THISMONTH'-''THISYEAR'+31-", "ABSOLUTE", "MONTH")
  24. $! The first day of next month, minus one day, is the last day of this 
  25. $! month.
  26. $    TARGET_DATE=F$CVTIME("1-''NEXTMONTH'-''THISYEAR'-1-", "ABSOLUTE")
  27. $    SUBMIT /AFTER=TARGET_DATE ...
  28.  
  29.     The last day of next month could be handled in a similar fashion. I
  30. will leave the handling of December and the new year as an exercise for the
  31. student. 
  32.  
  33. *************************************************************************
  34. *                                                                       *
  35. *                        Here, there be dragons!                        *
  36. *                      dragon@nscvax.princeton.edu                      *
  37. *                                                                       *
  38. *                                                Richard B. Gilbert     *
  39. *************************************************************************
  40.  
  41.