- 论坛徽章:
- 0
|
gzhgyzhh 发表于 2012-12-06 16:35 ![]()
测试结果
0 */1 * * * 每小时执行一次 - SHELL=/bin/bash
- PATH=/sbin:/bin:/usr/sbin:/usr/bin
- MAILTO=root
- HOME=/
- # For details see man 4 crontabs
- # Example of job definition:
- # .---------------- minute (0 - 59)
- # | .------------- hour (0 - 23)
- # | | .---------- day of month (1 - 31)
- # | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
- # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
- # | | | | |
- # * * * * * user-name command to be executed
复制代码 我也试了一下,事实证明前面的时间一定要填上数值。如果都为*,即使你在月的位置*/1它也是每分钟执行一次。
Commands are executed by cron( when the
minute, hour, and month of year fields match the current time, and at least one of the two
day fields (day of month, or day of week) match the current time (see "Note" below). Note
that this means that non-existent times, such as "missing hours" during daylight savings con-
version, will never match, causing jobs scheduled during the "missing times" not to be run.
Similarly, times that occur more than once (again, during daylight savings conversion) will
cause matching jobs to be run twice. |
|