home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / cronrgf.zip / crontest < prev    next >
Text File  |  1993-11-04  |  3KB  |  86 lines

  1. ; Sample file for CRONRGF.CMD
  2. ;
  3. ; Rony G. Flatscher, Vienna/Austria/Europe
  4. ; University of Business Administration and Economics
  5. ; Vienna, 1993-11-04
  6. ;
  7. ;
  8. ; This is a comment (starts with a ';' - semicolumn)
  9. # This is a comment (starts with a '#')
  10. ; empty lines are ignored too...
  11.  
  12.  
  13. # LAYOUT OF THE CRON-FILE:
  14. #    * * * * * command
  15. # or
  16. #    minute hour day month weekday command
  17. # where minute  ranges from 0-59,
  18. #       hour    ranges from 0-23,
  19. #       day     ranges from 1-31,
  20. #       month   ranges from 1-12,
  21. #       weekday ranges from 1-7 (1 = Monday, 2 = Tuesday, ..., 7 = Sunday
  22. #
  23. # you can give a list of values, separated by a comma (,), e.g. "1,3,7"
  24. # you can give a range of values, separated by a dash (-), e.g. "1-5"
  25. # you can give a star (*) instead of a value, meaning entire range of all valid values
  26. #
  27. # the given command is only executed when all criteriae are fullfilled !
  28. #
  29. # restriction: unlike to Unix, the percent-sign (%) is treated like any other character  and
  30. #              not as a new-line
  31. #
  32.  
  33.  
  34. ; example-entries in a cron control-file
  35. ;
  36. ; the given command is only executed when all criteriae are fullfilled !
  37. ;
  38.  
  39. ; the following command "@ECHO HI, I am Nr. 1 to be echoed every minute" would be
  40. ; executed every minute
  41. *  *  *  *  *  @ECHO Hi, I am Nr. 1 to be echoed every minute & pause
  42.  
  43. 59 23 31 12 5 command, one minute before year's end, and only if the last day is a Friday
  44.  
  45. ; comment: every year at 17:45 on June 7th:
  46. 45 17  7  6  *  dir c:\*.exe
  47.  
  48. # comment: on every full quarter of an hour 
  49. #          at midnight, 6 in the morning, noon, 6 in the evening
  50. #          on the 1st, 15th and 31st of 
  51. #          every month on
  52. 0,15,30,45   0,6,12,18   1,15,31   *   *   backup c:\*.* d:\ /s
  53.  
  54. ; at noon on every day, if it is a weekday (Mo-Fri):
  55. 0 12 * * 1-5 XCOPY Q:\* D:\ /s
  56.  
  57. ; every minute in January, March, May, July, September and November:
  58. *  *  *  1,3,5,7,9,11  *  dir c:\*.cmd
  59.  
  60. # at the last day of the year at 23:01, 23:02, 23:03, 23:05, 23:20, 23:21,
  61. # 23:22, 23:23, 23:24, 23:25, 23:30, 23:31, 23:32, 23:33, 23:34, 23:35,
  62. # 23:59
  63. 1,2,3,5,20-25,30-35,59   23   31   12   *   COPY D:\*.log E:\backup
  64.  
  65. ; make backups of OS2.INI and OS2SYS.INI on every first monday of a month,
  66. ; at 9 o'clock in the morning
  67. 0 9 1-7 * 1 showini /bt d:\os2\os2.ini
  68. 0 9 1-7 * 1 showini /bt d:\os2\os2sys.ini
  69.  
  70. # at midnight on every month:
  71. 0 0 1 * * tapebackup /all
  72.  
  73. ; execute every minute, no restrictions:
  74. *  *  *  *  *  @ECHO Hi, I am Nr. 2 to be echoed every minute & pause
  75.  
  76. # execute every minute in January, February, March only !
  77. * *  *  1,2,3  *  any-command any-arguments
  78.  
  79. ; execute every day at midnight
  80. 0 0 * * * any-command any-arguments
  81.  
  82. # execute every wednesday at midnigth !
  83. 0 0 * * 3 any-command any-arguments
  84.  
  85. ; this is a comment which concludes the sample file ===========================
  86.