using the at command

Can I use the at command to run a command like "say". In effect can I make my mac say a text at a specified time?

I tried writing a say command to a text file on the desktop called "atjob".

<pre> say "Take a break now"</pre>

then tried

<pre> at -f ~/Desktop/atjob 18:36</pre>

and voila! nothing happened at 18:36

atq showed job scheduled at 18:36.

How can I make it work?

PowerMac G4, iBook G4, MacBook Pro, Mac Pro, Mac OS X (10.5.7)

Posted on Jul 28, 2009 3:47 PM

Reply
5 replies

Jul 28, 2009 4:02 PM in response to dj9027

The man page says this ...

NOTE
at, batch, atq, atrm are all disabled by default on Mac OS X. Each of these commands depend on the
execution of atrun(8) which has been disabled due to power management concerns. Those who would like
to use these commands, must first (as root) re-enable atrun by running:

launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist


Eric

Jul 28, 2009 4:14 PM in response to dj9027

VOILA! It worked.

gave an absolute path as Keith suggested.
the file "atjob" was modified so that it contained.

<pre> /usr/bin/say "Make coffee now and take a break"</pre>

Only thing thats left unexplained is: I running an iMac and am wondering what power management issue can I run into if I turn on at. I guess its a concern only for laptop users?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

using the at command

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.