linux上在指定时间段内每隔多少分钟自动执行任务计划crontab
#/bin/sh
datename=$(date +%Y%m%d-%H%M%S)
echo $datename >> /tmp/logtest.txt
*/2 19,20 * * * /bin/sh /root/1.sh
在每天晚上2点到19和20点每2分钟执行一次
[root@dpm ~]# cat /tmp/logtest.txt
20191112-180001
20191112-180201
20191112-180401
20191112-180601
20191112-180801
20191112-181001
20191112-181201
20191112-181401
20191112-181601
20191112-181801
20191112-182001
20191112-182201
20191112-182401
20191112-182601
20191112-182801
20191112-183001
20191112-183201
20191112-183401
20191112-183601
20191112-183801
20191112-184002
20191112-184201
20191112-184401
20191112-184601
20191112-184801
20191112-185001
20191112-185201
20191112-185401
20191112-185601
20191112-185801
20191112-190001
20191112-190201
20191112-190401
20191112-190601
20191112-190801
20191112-191001
20191112-191201
20191112-191401
20191112-191601
20191112-191801
20191112-192001
20191112-192201
20191112-192401
20191112-192601
20191112-192802
20191112-193001
20191112-193201
20191112-193401
20191112-193601
20191112-193801
20191112-194001
20191112-194201
20191112-194401
20191112-194601
20191112-194801
20191112-195001
20191112-195201
20191112-195401
20191112-195601
20191112-195801
创新互联建站坚信:善待客户,将会成为终身客户。我们能坚持多年,是因为我们一直可值得信赖。我们从不忽悠初访客户,我们用心做好本职工作,不忘初心,方得始终。十余年网站建设经验创新互联建站是成都老牌网站营销服务商,为您提供做网站、网站设计、网站设计、HTML5建站、网站制作、成都品牌网站建设、重庆小程序开发服务,给众多知名企业提供过好品质的建站服务。
文章题目:linux上在指定时间段内每隔多少分钟自动执行任务计划crontab
网页网址:http://scyanting.com/article/iggdij.html