Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to execute scheduled tasks with at command:

echo " $1" | at 08.00 > at_output.txt  2>&1

I would have the output of, but what I have instead is this output:

job 5 at Fri Sep 23 08:00:00 2011
share|improve this question
up vote 1 down vote accepted

That is because you're echoing the output of $ at 08.00 into at_output.txt.

Try this instead.

$ at 08:00
./ > at_output.txt

Then you'll get a confirmation like this.

job 1 at Sat Sep 24 08:00:00 2011

Edit: Alternatively for shell scripts, you can restructure the command like this.

./ > at_output.txt | at 08:00
share|improve this answer
I have to schedule the AT command in a script so I cannot input the AT from keyboard – robob Sep 23 '11 at 6:37
@robob See edit. :) – Jin Sep 23 '11 at 6:47
I think it's the right answer :-) In the night I'll check and I'll give you the answer ok. Thanks a lot – robob Sep 23 '11 at 12:11
I try to run "echo " $1 > at_output.txt" | at 18.40" but nothing happens – robob Sep 23 '11 at 16:53
You're echoing the string literal " $1 > output.txt". What you want to do, from what I understand, is to run the script and echo the output into the at_output.txt, which is taken care of by the > character in my solution. – Jin Sep 24 '11 at 3:52

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.