Intro and a few questions

Jeffrey F. Bloss jbloss at tampabay.rr.com
Thu Dec 28 22:39:17 UTC 2006


Chris Gilland wrote:

> 3.  My last question is, is there any program that will allow me to
> use my computer as an alarm clock.  Yes, I do know I could set up a
> kron job, but I don't quite feel ready yet to tackle kron.  I've been
> told for beginners, it's somewhat complicated to start with.

One solution I ran across (I don't actually use it much) is a plugin
for XMMS called "Alarm". I have v0.3.7 installed via 'apt-get
xmms-alarm' but I'm not sure which repository it comes from. Or...

http://freshmeat.net/projects/xmmsalarm/

You'll of course need XMMS up and running for it to "go off", but it's a
pretty nicely featured "alarm clock". Configurable on a per-day basis,
can be set to "fade in", shuts off after a number of hours/minutes if
you like, custom playlist (I use use one with just 'Time' by Pink Floyd
in it when I do use it), and has the ability to issue "Additional
Commands" to XMMX whatever those might be.

There's also the 'at' command, a one-time-deal scheduler that accepts
it's directives in a more human readable syntax. You set it up by
typing 'at [time] <ENTER>' at the command prompt, entering jobs, then
hitting <CTRL+D> when you're done. It will look something like this
in action...

  user at host$ at 4:30 AM
  > mplayer /path/to/some/music/file/my.mp3
  > <EOT> 

This would cause my.mp3 to play at 4:30 in the morning, assuming of
course it exists and you have mplayer in your path. You could always
use 'play' and a .wav file or something. Whatever you have available to
make noise in a terminal window.

Here's a link to a quick 'at' tutorial I just ran across if you're
still confused...

http://www.hccfl.edu/pollock/Unix/AtDemo.htm

Beyond those two options, cron isn't really all *that* difficult to
master for simple jobs. It gets a little dicey when you want to schedule
something for every other Tuesday only during odd numbered months at
4:30 am and every half hour after noon if it's a full moon, but for a
Monday-Friday 4:30 wakeup I'd create a text file named cron.txt in my
home directory, add the line...

30 4 * * 1-5 /command/to/exexute

...where /command/to/execute is however you make noise as above. Save
the file and issue the command 'crontab ~/cron.txt'. Simple as that.

The 30 is the minutes, the 4 the hour (0-23), and the 1-5 is the days
of the week with Sunday being '0'. The two '*' are place holders for
'day of the month' and 'month of the year'. The command 'crontab -l'
'lists your scheduled jobs, and 'crontab -r/ nukes them all. If you need
to make changes/additions/whatever edit the cron.txt file and re-issue
the command 'crontab ~/cron.txt'.

I'm sure there's tons of other ways to do it, maybe even a slick Gnome
Panel applet or something, but that should get you to work on time this
week at least. ;)

Enjoy!

-- 
     _?_      Outside of a dog, a book is a man's best friend.
    (o o)         Inside of a dog, it's too dark to read.
-oOO-(_)--OOo-------------------------------[ Groucho Marx ]--
    grok!              Registered Linux user #402208
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 892 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061228/75bd0814/attachment.sig>


More information about the ubuntu-users mailing list