Skip to content

crontab  #4

@felix0102

Description

@felix0102

crontab中的任务增加自己的日志,这样出错后,比较容易看到原因。

0 6 * * * $HOME/for_crontab/createTomorrowTables >> $HOME/mylog.log 2>&1

把错误输出和标准输出都输出到mylog.log

注意:不要写成

0 6 * * * $HOME/for_crontab/createTomorrowTables 2>&1 >> $HOME/mylog.log

否则就输出到标准输出了

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions