run every monday at 5am

14,285

Have two entries:

to run every Monday at 5 AM : 0 5 * * 1

to run on 1st of every month at 5 AM : 0 5 1 * *

OR, if you want a single entry, the you may have to do something like: https://github.com/xr09/cron-last-sunday/blob/master/run-if-today

Share:
14,285
agucho
Author by

agucho

Web Application Developer, using PHP, CodeIgniter, Laravel, jQuery, html, css, js, Twitter Bootstrap, LESS, MySQL, rsync, git, ExpressionEngine add-on developer

Updated on August 13, 2022

Comments

  • agucho
    agucho over 1 year

    I generated a cron to run every Monday at 5am.

    0   5   1   *   1
    

    The third number, 1, for day of month, has it set to run on the first of every month as well as Monday.

    Do I change that 1 to 0 so it ignores the day of month? Otherwise it will run every Monday as well as run on the 1st of the month.