Using cron to treat my strained muscle

4 06 2009

Last night, I strained my right thigh 5 minutes into a soccer game. It sucks because it was an important game and I really wanted to win. Had we won, we would have made the playoffs. But we lost and it is the end of the season for the Raiders FC.

What sucks even more is that I have another big game on Sunday with my other team: Reds United. We are playing the one team that we need to beat to finish on top of the league. That means I have 3 days to recover from my injury. That’s not a lot so I’m trying to be as disciplined as possible in treating it.

Based on what I could have found on the web (Wikipedia has been my doctor for years now), I should treat it with ice. However, applying ice for more than 15 minutes is bad and you need to let the leg warm up again for at least 45 minutes before icing it again.

It’s easy to get lost in work and forget to re-apply the ice, or to stop icing my legs, so I’m using a combination of gnome-schedule, a nice little GUI for cron and notify-send to remind me to start/stop icing at the right time.

The GUI is super-simple to use. To install it: sudo apt-get install gnome-schedule

Then just type gnome-schedule on the command line to get it started.

gnome-schedule

You see my little schedule there, I’m using libnotify-bin’s notify-send to show me ‘growl-like notifications’ when it’s time to start or stop icing:

start_icing

I use gnome-schedule together with notify-send all the time to quickly set up reminders for myself. The point of this whole post was to show you a nice way to set reminders for yourself on a Linux box.

All right, gotta go. It’s time to start icing again. I really want to play on Sunday!

Advertisement

Actions

Information

6 responses

4 06 2009
kl0

wikipedia is a great physician. good luck with the leg. lol @ the start icing/stop icing notifications.

4 06 2009
Mark

You could do the same thing (or something very similar) with festival, so you would be notified without having to look at the screen (i.e., if you were looking at another screen, or stepped away for a moment).

Just do: sudo apt-get install festival

And then, enter something like the following in cron:

12 15 * * * echo “Time to start icing champ” | festival –tts
12 30 * * * echo “OK. You can stop icing now.” | festival –tts

More on installing/using festival in Ubuntu at https://help.ubuntu.com/community/TextToSpeech

4 06 2009
Luc Castera

Mark,

Very cool trick. I did not know about festival. Thanks for pointing that out.

24 07 2009
Jeremy

I’m having problems with this. I built a command that works fine if I run it from a command line and if I look at my syslog cron is running it on schedule, but no notification is showing up from the scheduled task.

24 07 2009
Jeremy

UPDATE: I had to tell it which display to use. My command looks like this:

DISPLAY=:0.0 /usr/bin/notify-send ‘Title’ ‘Message Body’

27 07 2009
Luc Castera

Jeremy,

Sorry for the late reply. It seems like you figured out how to get it to work. Thanks for pointing that out. I’m sure it will help other folks reading this.

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.