search

Home  >  Q&A  >  body text

linux - crontab每3天执行一次任务的每3天的含义是啥?

是当时生效后每隔三天吗?还是每月1号起,每隔三天?

ringa_leeringa_lee2785 days ago1891

reply all(4)I'll reply

  • 迷茫

    迷茫2017-04-17 15:17:55

    Neither of the first two answers is accurate:

    The value range and meaning of the five columns of numbers representing time in

    crontab are as follows:

    分钟 (0-59)
    小时 (0-23)
    日期 (1-31)
    月份 (1-12)
    星期 (0-6)    // 0 代表星期天

    If you write:

    0 0 */3 0 0 xxx.sh

    This is not strictly three days. This will be executed on the 1,4,7,10,13,16,19,22,25,28,31 day of each month. For details, please see: https://segmentfault.com/q/1010000002402396/a-1020000002402524

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 15:17:55

    The first execution will start from 0:00 the next day and 72 hours later

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 15:17:55

    You understand it as every 72 hours

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 15:17:55

    The correct answer upstairs, 分时日月周, depends on how you write it

    reply
    0
  • Cancelreply