首页 > 代码库 > shell批量添加计划任务

shell批量添加计划任务

#!/bin/bash



for i in `cat ./iplist.ini `

do

    echo $i

    scp ./MonitorProcess.sh $i:/home/haoren/

    ssh $i "(echo ‘*/5 * * * * /home/haoren/MonitorProcess.sh‘ ;crontab -l) |crontab"

    echo "Synchronization is complete."

done


shell批量添加计划任务