Setting up an atjob.

Tim Chase blinux.list at thechases.com
Sun Jan 20 13:44:04 UTC 2013


On 01/20/13 07:00, Anders Holmberg wrote:
> echo _mplayer √/home/anders/alarm.weav | at 08:00
> But it does not execute the job.
> It tells me:
> Warning: commands will be excecuted using /bin/sh job 4 at sun january 20 09:00 2013

I'm seeing a couple possible issues.  In the text you pasted, 
there's an underscore before "mplayer", a checkmark/radical sign 
before the path to the file to play, and you've spelled it ".WEAV" 
instead of ".WAV".  You should be able to just echo it to a shell to 
get it to execute immediately:

   echo mplayer /home/anders/alarm.wav | sh

Once you're certain that is working, you can use <up> or control+P 
to recall the previous command-line and change "sh" to "at 8:00".  I 
use "at" regularly with "at now + 3 min" to set a reminder to do 
something in N minutes.

Assuming you've got those correct so that the mplayer command 
actually works, I presume you're concerned about the change in time 
(you specified 8:00, it said it would run at 9:00), it's possible 
that you have some difference in time-zone settings.  What does

   echo $TZ

return for you?  On my box it returns nothing.  However, if it 
returns something for you, it might be incorrect.

Also check the output of "date" to make sure that the current 
*system* date is correct.

Finally, if your machine goes into sleep/suspend mode before your 
alarm is set to go off, I'm not sure what happens to the 
alert--whether it wakes the machine to fire off; if it defers until 
you power back up; or if it doesn't fire at all.

-tim







More information about the Blinux-list mailing list