home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / util / unix / ftpscrip.tz / ftpscrip / FtpExtra / bin / ftpnightly < prev    next >
Encoding:
Text File  |  1991-09-16  |  2.3 KB  |  54 lines

  1. # This script runs everynight.  It performs various tasks, including
  2. # arranging for itself to be run the next night.  If you don't have 
  3. # access to the 'at' command on your machine, and want things to 
  4. # happen automatically, you will have to figure out another way. Perhaps
  5. # through the cron deamon.  Please note that at jobs send you mail.  While
  6. # debugging scripts this is great since you can see whats running etc.
  7. # but once you get things working, its a pain to delete that file 
  8. # everyday.  Ive tried to keep mail to a minimum by haveing only this
  9. # one file run an at, instead of each script recursing by itself.
  10. # If you are running Sun/OS and want to delete 'at' notices automatically,
  11. # add the lines ... to your .mailrc  (Its not perfect, but better'n'nothin')
  12. #     if r
  13. #    d /"at"
  14. #     endif
  15. #
  16.  
  17.  
  18. # I echo the machine so I'll know where the 'at' job is running from.
  19. # With multiple accounts, its easy to forget which machine does what.
  20. echo 'Running ftpnightly on host: '`hostname`
  21.  
  22. # Set up tommorrows at job.  This is first so that even if something
  23. # causes the script to fail, it will run again the next day.  Since 
  24. # complete havok would follow if we all tried to ftp at the same time,
  25. # I propose the following system.  Have your job run at hour:min, where
  26. # min is Birthday * 2.  By way of example, I was born on Sep 13.  So 
  27. # I have my job run 13 * 2 = 26 min after the hour. Of course the hour
  28. # you chose to run at will depend on the time differential between you
  29. # and the sites you contact.
  30.  
  31.  
  32. # at 3:26am tomorrow $FTPEXTRAS/bin/ftpnightly 
  33.  
  34. # ftpcheck, will run your script for various sites. It primarily is used
  35. # to get updated listings of files currently in the archive. Almost all
  36. # the scripts rely on this in some way. You'll be working with outdated
  37. # information if you don't run this.
  38. echo 'ftpcheck'
  39. $FTPEXTRAS/bin/ftpcheck
  40.  
  41. # summexget, this is the script that mirrors sumex.  Doing this can
  42. # use up disk space at an alarming rate.  Please consider carefully
  43. # before uncommenting the line. 
  44. # echo 'summexget'
  45. # $FTPEXTRAS/bin/mirror.sumex-aim.stanford.edu
  46. # cd $FTPEXTRAS/mirror/sumex
  47. # undo
  48.  
  49. # ftpdoc, will extract the TeachText and MacWrite documentation of .sit
  50. # archives into readable text.  Puts them in /doc below the mirror.
  51. # This requires some additional executables. See the script.
  52. # echo ftpdoc
  53. # $FTPEXTRAS/bin/ftpdoc
  54.