Home  >  Q&A  >  body text

linux - 服务器定时计划crontab参数疑问

具体的crontab命令参数我知道一次分别是:分 时 日 月 周 脚本命令

如果我想设置每半小时执行一次改怎么设置呢!这样设置的30 时 日 月 周 脚本命令貌似没执行呢!没拉到日志

大家讲道理大家讲道理2713 days ago670

reply all(4)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 15:34:35

    You are executing this at 30 minutes every hour, so you are executing it once an hour
    In the window that comes out of crontab -e, you don’t need to write the user name, just write the command directly

    */30 * * * * 命令

    reply
    0
  • 黄舟

    黄舟2017-04-17 15:34:35

    */30 * * * * means execution every thirty minutes

    The configuration of the script is:
    分 时 日 月 周 用户 脚本命令
    Don’t omit the running user, otherwise the command will be parsed into the user, causing failure

    reply
    0
  • 迷茫

    迷茫2017-04-17 15:34:35

    Your setting really doesn’t work, it should be like this*/30 * * * * /server/php7.02/php /htdocs/example.web.com/action/post/example.php

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 15:34:35

    Graphic reference method
    http://www.corntab.com/

    reply
    0
  • Cancelreply