Remind: The Ultimate Personal Calendar
Remind is a calendar and reminder program for Linux and most UNIX Systems. I started writing Remind in 1989 because I was fed up with the limitations of the UNIX calendar program. In the last ten years, it has accreted features and has become one of the most sophisticated calendar programs I've seen. I'd like to take you on a journey through the history of Remind, demonstrating some of the features which lead me to immodestly call it the “Ultimate Personal Calendar”.
First, let's start with the venerable UNIX calendar program. This program simply scans a text file for lines containing likely-looking dates. It prints any lines containing today's or tomorrow's date (where Monday is considered “tomorrow” relative to Friday). You can also arrange to have reminders mailed to you.
Well, this is fine for very simple things. However, there is no provision for repeating reminders, so you can't (for example) remind yourself of something on the first of every month.
The next step up in sophistication is cron. This lets you specify dates in a relatively sophisticated format, so you can remind yourself of daily, weekly or monthly events. Still, cron won't handle fairly simple things like events which happen on the first Wednesday of every month.
To remedy these shortcomings, I started work on Remind. In its simplest form, Remind is similar to calendar in that it reads a text file and sends reminders to standard output. However, Remind uses a sophisticated date-specification language which allows very complex reminders to be issued. Although the language is sophisticated, it is still quite intuitive for simple cases. Let's look at a few examples from a Remind script file:
REM 6 January MSG David's birthday.
That example is fairly straightforward. On January 6 each year, it reminds me of my birthday. But suppose I need advance warning of my wife's birthday, so I have time to buy her a present. Try this:
REM 20 December +7 MSG Norine's birthday is %b.A little more complex, but still understandable: The +7 means Remind starts warning me seven days ahead of time. The %b is a special substitution sequence, and it works like this:
On 13 December, %b is replaced with “in 7 days time”
On 19 December, %b is replaced with “tomorrow”
On 20 December, %b is replaced with “today”
How about some more tricky reminders? My local Linux users' group meets on the first Wednesday of the month. How do we express this in Remind?
REM Wed 1 MSG OCLUG Meeting.
How does it work? The Wed is recognized as a weekday token, and the 1 as a day-of-the-month token. If both of these tokens are present, the trigger date is the first weekday on or after the day-of-the-month. If you specify multiple weekdays, the first matching one is used. Here are a few more illustrations:
REM Wed MSG Issued every Wednesday. REM Mon Tue Wed Thu Fri MSG Issued every working\ day. REM Mon Tue Wed Thu Fri 1 MSG Issued first\ working day of the month. REM Sat Sun 1 June MSG Issued first weekend day\ in June.Seemingly more difficult things like the first Tuesday after the first Monday in a month are, in fact, easy: a little thought shows that the first Tuesday after the first Monday in a month is simply the first Tuesday on or after the second of the month:
REM Tue 2 MSG Presto! First Tuesday-after-Monday.The last Monday in a month is handled like this:
REM Mon 1 --7 MSG Last Monday of a month.This one is rather tricky: the Mon 1 part is the first Monday of a month, but the --7 means “go back 7 days”. So that reminder is triggered seven days before the first Monday of every month—which happens to be the last Monday of the previous month. The --n sequence can solve some thorny problems related to the “last something in a month”.
- Integrating Trac, Jenkins and Cobbler—Customizing Linux Operating Systems for Organizational Needs
- New Products
- Tech Tip: Really Simple HTTP Server with Python
- Returning Values from Bash Functions
- Non-Linux FOSS: Remember Burning ISOs?
- EdgeRouter Lite
- RSS Feeds
- Cooking with Linux - Serious Cool, Sysadmin Style!