- 论坛徽章:
- 0
|
Debian 4.0
crontab怎么使用?
我现在用 crontab -l
debian:/etc/cron.d# crontab -l
18 16 * * * /etc/webmin/cron/tempdelete.pl
@daily /etc/webmin/sarg/generate.pl
但是/etc/crontab的内容如下:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/pub
# m h dom mon dow user command
# 17 * * * * root cd / && run-parts --report /etc/cron.hourly
# 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
# 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
# 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
0-59/5 * * * * root /pub/detect2.sh
# --- BEGIN ROOT CRONTAB ---
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/var/www
00 08-18/1 * * * sarg-reports today
00 00 * * * sarg-reports daily
00 01 * * 1 sarg-reports weekly
30 02 1 * * sarg-reports monthly
现在我想让这行执行:
0-59/5 * * * * root /pub/detect2.sh
如何才能实现? |
|