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
总结
以上所述是小编给大家介绍的linux 上在指定时间段内每隔多少分钟自动执行任务计划crontab,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对安科网网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!
相关推荐
Ongoingcre 2019-11-14
行吟阁 2020-05-03
LUOPING0 2019-12-11
skywalker0 2016-02-25
微软FixIt 2011-10-28
TimelessFaith 2011-03-24
longwang 2014-11-25
Jantywei 2014-07-09
willcoder 2012-06-06
易分享 2013-07-07
电工之窝 2011-10-26
yupi0 2010-05-28
songerxing 2010-03-23
nullplus 2019-06-13
sscygh 2018-07-25
yjbaobo 2015-10-14
seacover 2013-04-05
hxw0 2019-04-04
mingkr 2019-04-01