I built one of these for myself in 1995 and have been happily using it ever since. Here's the source code:
0 0 19 7 * /usr/bin/mail -s "REMINDER: john T. birthday" me@mydomain.com
0 0 1 8 * /usr/bin/mail -s "REMINDER: MAKE xmas hotel reservations NOW for good pricing..." me@mydomain.com
This is why I like HN, and why it continues to be a much-higher-quality place to visit on the web than many other forums: there were no snarky replies, no "I can't believe you don't know cron" - just multiple friendly, helpful replies explaining exactly what this format is.
The file is a "cron schedule" [1]. Paste the series of numbers (and the *) into the box on the site below and you'll see it means "midnight on July 19th every year". The commenter will probably have this in their personal "crontab" file. They're emailing themselves every year on that date.
Date calculations are much more flexible and the files
can be modular.. and there's printed calendar generation options if you so choose. https://www.roaringpenguin.com/products/remind There is also the traditional Unix 'calendar' program as well..
Comments (568) 125 threads
Show all comments
Showing thread 3 of 125
In short: At 00:00 hours on 19/07 (i.e. July 19) execute that command. The * means 'regardless of what day of the week it is'.
[Edit:] What the... Nope, sorry, seems you're right and I'm wrong -- weekly it is. [/Edit]
'0 0 19 7 ' means 'midnight of July 19th, regardless () the weekday.
It is example 2 from 'man crontab'.
It's minute, hour, day of month, month, day of week
In this case, repeat every 19th of july at midnight.
What a good community.
Continue this thread — 4 replies
[1] https://crontab.guru/
Date calculations are much more flexible and the files can be modular.. and there's printed calendar generation options if you so choose.
https://www.roaringpenguin.com/products/remind
There is also the traditional Unix 'calendar' program as well..