home *** CD-ROM | disk | FTP | other *** search
/ Amiga Computing 67 / ac067a.adf / Cron / Amicron.doc < prev   
Text File  |  1978-03-30  |  4KB  |  83 lines

  1.                     AmiCron - Cron task for the Amiga
  2.  
  3. This is a rather crude but effective version of the Unix (tm) 
  4. program known as "cron" modified to run on an Amiga.  For those 
  5. who aren't Unix knowledgeable, cron is a background task which 
  6. uses a disk-resident table to automatically run certain tasks on a 
  7. regular basis.  The cron table's format is very simple...it 
  8. contains entries in the form of lines where each line has 6 fields 
  9. and each field is separated by "white space" (either tabs or 
  10. spaces) from it's neighbor. The fields are as follows:
  11.  
  12.    1.  Minute       (0-59)
  13.    2.  Hour         (0-23)
  14.    3.  Day          (1-31)
  15.    4.  Month        (1-12)
  16.    5.  Day of week  (0-6 where 0=Sunday and 6=Saturday)
  17.    6.  Command      This is the command to be run at the appointed 
  18.                     time.  It will be run just as if typed into 
  19.                     the CLI.
  20.  
  21. Each of the first 5 fields are numbers.  However, it is 
  22. permissable to use an asterisk (*) in a field to mean ALL possible 
  23. numbers for that field,  and you can specify a series of numbers 
  24. separated by commas (,) and ranges separated by dashes (-).  For 
  25. instance, in the Day field you could specify "1,5,10" to mean the 
  26. first, fifth, and tenth days of the month; or you could specify 
  27. "1-15" to mean the first through the fifteenth of the month.  Here 
  28. are some examples of Amicron table entries:
  29.  
  30.       Print the date in the crontask window every minute:
  31.           * * * * * date
  32.   
  33.       Print the date in the crontask window on the hour, every hour:
  34.           0 * * * * date
  35.   
  36.       Run uupc at 4:30 am every day except Sat and Sun:
  37.           30 4 * * 1-5 uupc -siscuva
  38.   
  39.       Incrementally backup the files every other day at 7:30 pm:
  40.           30 19 * * 1,3,5 sdbackup -l -s LAST dh0: incbkup_1:
  41.  
  42.     Backup the files on the 1st and 15th of each month at 1:00 am:
  43.         00 01 1,15 * * sdbackup -l dh0: SemiBkup_1:
  44.  
  45. The Amicron table file is located using the following path:
  46.     sys:usr/spool/cron/crontab
  47. and errors, if any are logged into the following path:
  48.     sys:usr/spool/cron/cronerr
  49.  
  50. Crontab entries *MUST* be left justified starting in column 1 and 
  51. each entry must contain 6 fields, each separated by spaces or 
  52. tabs.
  53.  
  54. To run Amicron, you must first set up the directory 
  55. "sys:usr/spool/cron" and then use your favorite editor to create 
  56. the "crontab" file.  Amicron needs a CLI window for displaying the 
  57. output of the commands it runs...but it can be made as small or 
  58. large as you wish.  Assuming that you have placed Amicron in your 
  59. command directory (c:), you can start it by typing the following 
  60. line into a "newcli" window:
  61.     Amicron
  62. Then you can size and move the window anywhere you want, just be 
  63. sure not to type anything else into the window because that would 
  64. prevent cron tasks from running.
  65.  
  66. I have an entry in my startup-sequence file that looks like this:
  67.    run newcli con:0/140/160/50/CronTask s:startcron
  68. The "s:startcron" file contains one line:
  69.    Amicron
  70. This automatically sets up a tiny CronTask window and runs Amicron 
  71. in it.
  72.  
  73. This program was originally written by Steve R.  Sampson (UUCP:
  74. sys1!killer!sampson), who very kindly responded to my request for
  75. a PD cron that I could port to Minix.  I haven't done that yet
  76. (My new Amiga 2000 came in right after I received the cron
  77. program <grin>) but will do so ASAP.  The modifications to make
  78. it run on the Amiga were very minor!
  79.  
  80. Rick Schaeffer          UUCP:  seismo!uunet!iscuva!ricks
  81. E. 13611 26th Ave.      Phone: (509)928-3533
  82. Spokane, WA  99216
  83.