Jan 302010
 

I went to bed the other night after browsing the web for about an hour. I knew I was going to have a hard time waking up, so I setup a task on my linux laptop to wake me at 7:00am with a mp3 I wanted to wake up to.

“What the heck do you mean you setup a task, what’s a task” you asked? Well, linus has a command that will carry out a specified task or series of tasks at a specific time that you set. “How do I employ this wonder of wonders” you ask? well, let me show you.

At the prompt, type this command

at 0700

followed by the ‘Enter’ key

When you press ‘Enter’ the prompt will change into an arrow indicating that more information is needed from you for what command to run at 0700.

Type the following command (assuming you have XMMS installed) which will play the specified mp3 file (also assuming that you actually have a mp3 file located in the directory shown below

> xmms /home/myusername/mp3s/wake_my_ass-up.mp3

Once you have typed what program to run, and what mp3 to play, press ‘Enter’ again and then press ‘Ctrl-D’

That’s it. Now, your puter will make the XMMS player play that particular mp3 file at the specified time. (ugh, I HATE getting up early)

More advanced task scheduling is possible using ‘cron’, which is explained elsewhere on this site. If you want to repeatedly execute any task, whether hourly, daily, weekly, monthly or yearly, setup a script and use cron to run it everyday. Setup multiple scripts to execute multiple tasks daily. Nice huh?

 Posted by at 4:09 pm

 Leave a Reply