home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / steward8.zip / SendDigest.cmd < prev    next >
OS/2 REXX Batch file  |  1996-06-05  |  1KB  |  38 lines

  1. /* SendDigest */
  2. /*
  3.  * This script will send out digests once per day at 1am.
  4.  * It must be started from the Steward directory where the
  5.  * digest.cmd file is.
  6.  *
  7.  * For each digest you want to be sent out, put a new line
  8.  * in the do while loop like the sample one.
  9.  *
  10.  */
  11.  
  12. call RxFuncAdd 'SysSleep', 'RexxUtil', 'SysSleep'
  13.  
  14. Minutes = time('M')                 /* minutes since midnight */
  15.  
  16. MinLeft = (60 * 24) - Minutes + 60  /* the number of minutes until 1am */
  17.  
  18. Seconds = MinLeft * 60              /* the number of seconds until 1am */
  19.  
  20. say 'Sleeping until 1am ...'
  21.  
  22. call SysSleep Seconds               /* sleep until then */
  23.  
  24. Seconds = 24 * 60 * 60              /* seconds in a day */
  25.  
  26. /* do this loop until stopped externally */
  27. do while 1
  28.   say 'Sending digests now.'
  29.  
  30.   /* Put your digest names here, one per line */
  31.   call digest 'vabuilder-digest'
  32.   call digest 'inetmail-digest'
  33.  
  34.   say 'Sleeping' Seconds 'seconds ...'
  35.   call SysSleep Seconds             /* go to sleep until tommorrow */
  36. end
  37.  
  38.