编写shell脚本

test.sh内容如下,上传到linux的root目录

linux定时任务每隔5分钟向文本追加一行

 

更改文件权限

chmod  777   test.sh

 

编辑定时任务

crontab  -e

*/5    *  *  *  *    /root/test.sh

 

查看定时任务

crontab -l

 

删除定时任务

crontab -r

 

==========================================================

 cron的格式

linux定时任务每隔5分钟向文本追加一行

*/5    *  *  *  *    /root/test.sh    每隔5分钟执行一次test.sh脚本

相关文章:

  • 2022-12-23
  • 2021-05-23
  • 2021-12-22
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-10
  • 2021-12-10
  • 2022-12-23
  • 2021-11-05
  • 2021-12-09
  • 2022-01-08
  • 2021-11-20
相关资源
相似解决方案