I’ve been a long-time user of Remember the Milk (RTM) for staying on top of my to-do list. I leave it open pretty much all the time using Prism, and make extensive use of the Android app as well. I use the daily reminder email to keep me on task day-to-day. One feature that I’ve missed though is a more flexible system for performing notifications.
I have some tasks that require only an occasional reminder. Most prominent among these are items tagged “waiting”. These are usually items that I’ve handed off to someone, so they’re off my list until I get a response back. I don’t need to review this list every day, but I also don’t want it to become a black-hole that I forget to check on a regular basis. For me, the best way to make sure that I’m going to review something is to have it pop into my email inbox.
After a quick search online, I discovered the wonderful RTMAgent Perl module by Yves Rutschle that provides a command-line interface to RTM. Combining this module with cron allowed me to roll my own custom email notifications for RTM.
The RTMAgent web site provides details on installing the module - it basically just requires running a CPAN install. I installed the module on my web server, since it runs full-time. Once the module is installed, you use the rtm Perl script to authorize access to your RTM account from the command-line interface. This authorization only needs to be done once.
With the script installed, you have a number of commands at your fingertips. While the script has commands for adding tasks, I’m just using it at this point for querying my RTM account and generating automatic emails. I set up two different cron jobs, one to send me a list and one to send a filtered list of tagged tasks.
The first command to use is “rtm -show list”. This will give you a numbered list of all the lists you’ve defined in RTM. Using the list number, you can then run “rtm -list x”, where x is the list number you’d like to see. This will show all the tasks in the list. The other handy command is “rtm -show -filter “tag:waiting status:incomplete””. The -show option tells the program to list the tasks, and the -filter option tells the program to filter the list based on your filter string. In the example shown, I’m listing all incomplete tasks that are tagged with the tag “waiting”.
Once you’ve got these commands working, you can use cron to automate them. If you’ve got cron set up to email job results, you can simply have cron execute the rtm commands you’ve created. The job will create the text listing, then cron will email it. Alternatively, you can pipe the output of the script to sendmail. I’m using the second option, so my cron command-line looks like this:
rtm -list 19 | mutt -s "Ongoing Tasks" firstname.lastname@example.org
This command lists all the tasks in list 19, then passes them to mutt, which sends an email to email@example.com with the subject line “Ongoing Tasks”. I’ve scheduled this cron job to run once per week so that I can get notifications of these tasks that may not have a due date, but I need to hear about anyway.
The RTMAgent module and rtm script provide some powerful capabilities to query and interact with Remember the Milk from the command line. Combined with cron you can create a notification system tailored to your needs. RTM is a wonderful example of a web application that provides the basic features we all need, then provides an API that allows people to build the customizations needed for their own use.