home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / comm / spot-1.3.lha / Spot / Rexx / Cleanup.spot < prev    next >
Text File  |  1993-10-04  |  1KB  |  47 lines

  1. /* This is an Arexx script which you can use from a cron to optimize spot area */
  2. /* Cleanup.spot Version 1.1 © 1993 by Benoit Mortier                           */
  3. /*                                                                                                                                                         */
  4. /* For comments, remarks, bugs, etc. contact:                                    */
  5. /* Fidonet: 2:291/715.4                                                          */
  6. /* UUCP: mortier@mortier.adsp.sub.org                                                                                     */
  7. /*                                                                                                                                                         */
  8. /* the only thing you have to change is the path of your logfile                             */
  9.  
  10. options results
  11. address spot
  12.  
  13. if ~show(Libraries,'rexxsupport.library') then
  14.     if ~addlib("rexxsupport.library",0,-30,0) then exit
  15.  
  16. log = "logs:spot.log"
  17.  
  18. open(logfile,log,'A')
  19.  
  20. call getdate
  21.  
  22. call writeln(logfile,'! 'date' 'time'  Maintenance')
  23.  
  24. 'maintenance QUIET NOREQ KEEPUNREAD'
  25.  
  26. call getdate
  27.  
  28. call writeln(logfile,'! 'date' 'time'  Optimize')
  29.  
  30. close(logfile)
  31.  
  32. 'optimize QUIET NOREQ'
  33.  
  34. exit
  35.  
  36. getdate:
  37. address command 'date >t:date'
  38.  
  39. open(mydate,'t:date','R')
  40.     today = readln(mydate)
  41.     date = subword(today,2,1)
  42.     time = subword(today,3,1)
  43. close(mydate)
  44.  
  45. delete(mydate)
  46. return
  47.