0

So I googled it and I just don't understand the last part. The question problem is as it follows. what is the result if the cron is as follows:

0  2   12   *   0,6    /usr/bin/test

Am I confused at the last 0,6 part since that's supposed to be the year?

David Foerster
  • 36,264
  • 56
  • 94
  • 147

2 Answers2

4

The last part is day of week. So 0,6 is Sunday and Saturday.

https://crontab.guru/#0_2_12_*_0,6

pfj
  • 56
2

No, that is the day-of-week field. From man 5 crontab

   Commands  are  executed  by cron(8) when the minute, hour, and month of
   year fields match the current time, and when at least one  of  the  two
   day  fields  (day of month, or day of week) match the current time (see
   ``Note'' below).  cron(8) examines cron entries once every minute.  The
   time and date fields are:

          field          allowed values
          -----          --------------
          minute         0-59
          hour           0-23
          day of month   1-31
          month          1-12 (or names, see below)
          day of week    0-7 (0 or 7 is Sun, or use names)
steeldriver
  • 136,215
  • 21
  • 243
  • 336