Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if there was a way to display a notification or something from the command line at a certain time. Like when the clock strikes 4:00pm. It would be nice if it would display it using Ubuntu's notify-osd tool:

enter image description here

share|improve this question
    
Do you need to know the exact second you are done with work for the day? – Troggy Sep 9 '09 at 20:04
2  
No. Who gets off at 4:00? I actually need to tell myself to goto bed. – Lucas McCoy Sep 9 '09 at 20:09
    
@Lucas Aardvark : LOL. – caliban Sep 9 '09 at 20:20
    
I get off work at 4:00pm.. then again, I get in to work at 7am most days.. – jamuraa Sep 9 '09 at 21:52
up vote 12 down vote accepted

As many of the other commenters said, the best way to do this on a daily basis is to use cron, but if you are only wanting to do it for one day, or sporadically, you can use the at command:

echo 'notify-send "Work day is done!"' | at 4:00PM

You can use at in a variety of ways, including as a tea timer:

echo 'notify-send "Get your tea!"' | at now + 3 minutes 
echo 'notify-send "Meeting in 1 hour with the big boss!"' | at 1pm tomorrow

It's quite useful for those one-off commands.

Check the at manpage for more syntax goodness.

share|improve this answer
    
You can't type the command on the after the invocation of "at." You have to do something like echo 'notify-send "Work day is done!"' | at 4:00PM – Ryan Thompson Sep 9 '09 at 23:06
    
True, I forgot about that little annoyance. – jamuraa Sep 10 '09 at 1:04
    
I liked your solution best because it can be easily changed and doesn't require root access to edit /etc/crontab – Lucas McCoy Sep 10 '09 at 17:08

Use notify-send to send the notification. Set it up as a cron job.

share|improve this answer
    
+1. I was just writing that! :) – Decio Lira Sep 9 '09 at 20:28

You can send commands to notify-osd like so:

notify-send "Go to bed!"

A crontab for daily notification at 4pm would look like so:

0 16 * * * /home/username/notify.sh
share|improve this answer

You can always set up a cron job to run a script @ 0400hrs. The tricky thing here, is to find out what command to use to popup a window (ala net send for windows), or to do anything to notify you to go off to bed.

notify-osd doesn't seem to support command-line prompt generation, you might want to try LinPopup2...

share|improve this answer

Looks like you are using gnome-do. There are a few plugins there that can be used - remember the milk (RTM) is one.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .