Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


Switched over to 'remind' personally..

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..


Could you explain how it works? I wonder what 0 0 19 7 * means.


It's a unix/linux crontab, for repetitive task. See https://en.wikipedia.org/wiki/Cron

It's minute, hour, day of month, month, day of week

In this case, repeat every 19th of july at midnight.


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.

What a good community.


Agreed, though my first reaction was definitely: "I can't believe you don't know cron". I had to step back a little and remember who the audience is. Then I wrote my comment (at the same time as everyone else here did).


Actually my first thought was - that guy was a smart-ass showing off. Of course many people wouldn't know a crontab line - Windows (and I guess Mac - never had one) don't have such magical tools.


Mac has cron. It's pretty standard on *NIX systems.


Yeah but is superseded by launchd. So although it has cron, it's not running by default for many years.


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.

[1] https://crontab.guru/


Have a look at https://en.wikipedia.org/wiki/Cron#Overview.

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'.


Regardless of what year, actually. So you're reminded of your friend's birthday every year, not just this one.

[Edit:] What the... Nope, sorry, seems you're right and I'm wrong -- weekly it is. [/Edit]


This is a CRON Job and the notation indicates the time and frequency that an action should take place. https://en.wikipedia.org/wiki/Cron


it's a crontab file.

'0 0 19 7 ' means 'midnight of July 19th, regardless () the weekday.

It is example 2 from 'man crontab'.


It is crontab.


Are you going to convert them all to systemd services? =p


You make your xmas hotel reservations on January 8? :) That's thinking ahead...


First day of 8th month..


You are sure to get good pricing at that point!


first day of August not January 8


I also use Cron for the same purposes; for one-time events, especially further in the future, I use a combination of at and mail.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: