Joel Carnat <j...@carnat.net> wrote: > Hello, > > I would like to run a command on "the last day of each month". > > From what I understood reading the crontab(5) manpage, the simplest > way would be setting day-of-month to "28-31". But this would mean > running the command 4 times for months that have 31 days. > > Is there a simpler/better way to configure crontab(1) to run a command > on "the last day of month" only ?
cron has no way to do this adding a non-portable extension doesn't really make sense the easiest way is to have your script run then (or every day), and make a more detailed check inside the script. this pattern is very common...