美文网首页
crond任务调度(定时任务调度)

crond任务调度(定时任务调度)

作者: Mr_ran | 来源:发表于2018-09-10 15:09 被阅读0次
    • 基本语法
      • crontab [选项]
      • 选项
        • -e : 编辑crontab定时任务
        • -l : 查询crontab定时任务
        • -r : 删除当前用户所有的crontab任务
      • crontab任务格式
        • 简单任务: */1 * * * * ls -l /etc >> /tmp/to.txt
        • 复杂任务:
          • 要先创建shell文件: /home/mytask1.sh
          • 给shell文件添加可执行权限
          • */1 * * * * /home/mytask1.sh
      • 重启任务调度
        • service crond restart

    相关文章

      网友评论

          本文标题:crond任务调度(定时任务调度)

          本文链接:https://www.haomeiwen.com/subject/xdusgftx.html