Running a cron job on Linux every six hours

后端 未结 7 874
旧巷少年郎
旧巷少年郎 2020-11-29 19:32

How can I run command every six hours every day?

I tried the following, but it did not work:

/6 * * * * *  mycommand
7条回答
  •  孤街浪徒
    2020-11-29 19:56

    Please keep attention at this syntax:

    * */6 * * *
    

    This means 60 times (every minute) every 6 hours,

    not

    one time every 6 hours.

提交回复
热议问题