I’m living in San Francisco, working in Palo Alto (40 miles away) and I’m taking the train every day to get to work (and go back home). My office is less than 10 minutes from the Caltrain station and there are trains every hour: 4:11pm, 5:11pm, 6:11pm.
I don’t like to check the clock every 5 minutes in order to not miss a train so I set up a cronjob1 to notify me when to leave the office. I slipt the code in 2 commands:
notify displays a notification on the Notification Center (OS X)
loctify displays a notification (through the previous command) but only when connected to a specific wifi network (I don’t want to be disturbed at home with those notifications)
and beside the 2 commands, the final step is to set up the
The first rule is to run the command at 15:55, 16:55, 17:55 and 18:55. The second runs at 58, etc.
And here is the result:
If you are interested to use this on your computer, you can get the code on my github (being comfortable with shell is strongly recommended):
It would be nice to be notify when Caltrain is late/delayed. One thing I can think off is to listen to tweets from @caltrain_news and somehow parse them to see if trains are delayed.