Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm new to Linux. And I tried using the at command to echo "Hello" after 2 minutes and I saw the following.

-$ at now + 2 minutes
-at> echo "Hello"
-at> <EOT>
job 7 at Tue Aug 9 23:59:00 2011

So far it hasn't worked. I'm trying to get used to the syntax. Am I missing something?

share|improve this question

migrated from stackoverflow.com Aug 10 '11 at 6:56

This question came from our site for professional and enthusiast programmers.

1 Answer 1

at is a funny little beast. Its default behaviour is to mail you whatever the output was to stdout or stderr. Redirecting its output is an annoying business that works intermittently depending on the system.

If you want to play with at, I'd recommend finding a program to start or stop, or write a script and throw the output to a text file like so:

at -m -f script.sh now + 2 minutes > outfile.txt  2>&1

Don't forget the 2>&1 at the end; it redirects stdout and stderr.

Your syntax is correct, so that isn't the problem -- the problem here is with at.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.