【问题标题】:Crontab nothing happens?crontab 什么都没有发生?
【发布时间】:2017-07-01 15:17:40
【问题描述】:

如果我跑步

crontab -l
16 12 * * *  cd ~/web/im2txt/im2txt && ./train.sh

我也试过

cd ~/web/im2txt/im2txt && ./train.sh

有效。

我正在等到我的 osx 系统时钟是 16:12(我将它设置在 16:11)我已经在终端打开和关闭的情况下进行了尝试。什么都没有发生,没有错误,什么都没有。 shell-command在你正常运行时输出数据到终端。

我能做什么?

【问题讨论】:

    标签: bash macos terminal crontab


    【解决方案1】:

    我认为您将命令安排在 12:16 :)

    当你运行sudo crontab -e时,你可以在你应该写的地方看到下面的评论:

    # m h dom mon dow  command
    

    这意味着首先是分钟,然后是小时。也许试试:

    12 16 * * * <command>
    

    终于可以简化命令了:

    /home/<your username>/web/im2txt/im2txt/train.sh
    

    TL;DR:

    12 16 * * * /home/<your username>/web/im2txt/im2txt/train.sh
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-03-24
      • 1970-01-01
      • 2013-06-12
      • 2021-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多