crontab_Linux定时模块(crond)使用注意

  1. 先检查crond的状态
service crond restart  

service crond status
  1. 用户要拥有文件的执行权限
chmod 777 start_test.sh
  1. 时间,是5个 *
  2. 必须写文件的绝对路径
  3. 指定执行的shell或者其他编译器的绝对路径
  4. 打印输出查看日志
# 10号的中午1点12执行脚本
12 13 10 * *  /bin/bash /home/Desktop/start_test.sh > /logs/bash_log/1.txt
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章