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

  1. /***************************************************************************/
  2. /* Maintenance.rexx   ©1993 Stu Churchill   2:250/107.97@fidonet           */
  3. /*                                                                         */
  4. /* $VER: Maintenance.rexx 1.50 (17.9.93)                                   */
  5. /*                                                                         */
  6. /* Call this script from your cron every morning to perform a daily        */
  7. /* maintenance of your messagebase                                         */
  8. /***************************************************************************/
  9.  
  10. options results
  11.  
  12. spot_path = 'Workbench:WBStartup/Spot CONFIGPATH "MAIL:Configs/Spot/"'
  13.  
  14. if ~show('ports','SPOT') then do
  15.   address command 'run 'spot_path
  16.   'WaitForPort SPOT'
  17.   quit = yes                  /* Marker to close SPOT after finishing */
  18. end
  19.  
  20. address 'SPOT'
  21. 'isiconified'
  22. if rc = 0 then do
  23.   icon = yes                  /* Marker to re-iconify after finishing */
  24.   'uniconify'
  25. end
  26. 'spot2front'
  27. 'isarealist'
  28. if rc = 5 then do
  29.   'arealist'
  30. end
  31. 'maintenance KEEPUNREAD NOREQ CLOSEWIN'  /* Perform maintenance */
  32.  
  33. if quit = yes then do
  34.   'quitspot NOREQ'            /* Close SPOT if we had to open it ourselves */
  35.   exit
  36. end
  37. if icon = yes then do
  38.   'iconify NOREQ'             /* Re-iconify if necessary */
  39. end
  40.  
  41. exit
  42.