Linux crontab执行脚本

1.首先编辑脚本文件,文件扩展名为.sh,如test.sh

   #!bin/bash

   #ceshi

cp /root/abc.txt /home

 2.  vim /etc/crontab

12 02 * * * root sh /home/test.sh

其中sh可以省略,但root不能省略。

猜你喜欢

转载自zxueyi.iteye.com/blog/2181329