home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / crgf202.zip / crontest < prev    next >
Text File  |  1995-05-02  |  3KB  |  92 lines

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