How to run a cron job on every Monday, Wednesday and Friday?

后端 未结 7 949
被撕碎了的回忆
被撕碎了的回忆 2020-12-08 06:18

How can one run a cron job for every Monday, Wednesday and Friday at 7:00 pm?

7条回答
  •  佛祖请我去吃肉
    2020-12-08 06:38

    This is how I configure it on my server:

    0  19  *  *  1,3,5 root bash /home/divo/data/support_files/support_files_inc_backup.sh
    

    The above command will run my script at 19:00 on Monday, Wednesday, and Friday.

    NB: For cron entries for day of the week (dow)

    0 = Sunday
    1 = Monday
    2 = Tuesday
    3 = Wednesday
    4 = Thursday
    5 = Friday
    6 = Saturday
    

提交回复
热议问题