[TriLUG] Why does my "every second month" cron job run on odd-numbered months?
Paul Bennett via TriLUG
trilug at trilug.org
Thu Aug 28 12:08:41 EDT 2025
Months are numbered starting from 1, right? I think we expect "every 2" to
be "0, 2, 4, 6, ..." but if there is no zero it does feel right to see "1,
3, 5, 7, ..." as the next best thing. Maybe?
On Thu, Aug 28, 2025, 11:52 Brian via TriLUG <trilug at trilug.org> wrote:
> Hi Gang,
>
> I have a crontab entry with the following schedule spec:
> 0 3 1 */2 * /do/a/thing.sh
>
> According to crontab.guru, that means “At 03:00 on day-of-month 1 in
> every 2nd month" which is what I intend.
>
> However, also according to crontab.guru, the upcoming schedule is:
>
> next at 2025-09-01 03:00:00
> then at 2025-11-01 03:00:00
> then at 2026-01-01 03:00:00
> then at 2026-03-01 03:00:00
> then at 2026-05-01 03:00:00
>
> Odd-numbered months. Why? I would interpret "every second month" to
> mean the even-numbered months. Is crontab.guru wrong? Am I wrong?
>
> Also, is there a command-line tool to answer "when will my cron tasks
> run next"?
>
> Thanks,
> -Brian
> --
> This message was sent to: Paul Bennett <paul.w.bennett at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that
> address.
> TriLUG mailing list : https://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web :
> https://www.trilug.org/mailman/options/trilug/paul.w.bennett%40gmail.com
> Welcome to TriLUG: https://trilug.org/welcome
More information about the TriLUG
mailing list