定时任务

1. tomcat 服务批量添加定时任务

for i in $(ll -d  /dir/*tomcat*|awk '{print $NF}');do echo "40 02 * * * /bin/bash /dir/file.sh $i  >/dev/null 2>&1"»/var/spool/cron/root;done

 

posted @ 2020-02-25 11:12  Hello_worlds  阅读(99)  评论(0编辑  收藏  举报