crontab puzzlement

David Fletcher dave at thefletchers.net
Mon Apr 3 20:10:08 UTC 2023


Hi,

I thought I understood how this works, but....

Running a 22.04.2 LTS headless server

The following two lines are added to /etc/crontab
0,20,40 7-10,16-19 25-30 4 1-5 dave play -qV0 fileA.flac
10,30,50 7-10,16-19 25-30 4 1-5 dave play -qV0 fileB.flac

Path to file locations removed to fit on one line

Each audio file is 8 minutes or so long and the two play in turn at the
designated hours of the day. cron appears to obey the two hours of the
day ranges that I have set, so it plays them 07:00-11:00 and 16:00-
20:00,

BUT....

I was expecting it to not start playing until Tuesday 25th April so why
was it playing the sound files today? I thought it was OK to put in day
of the month ranges same as hours of the day ranges, but, cron seems to
behave here as if it's a * in the day of the month field.

I've no idea if I'm being daft and doing something wrong or it's
something else. Help, please?

TIA

Dave




More information about the ubuntu-users mailing list