Re: Need help in 'at' command
- From: Jurgen Haan <jurgen@xxxxxxxx>
- Date: Fri, 28 Mar 2008 12:09:21 +0100
R C V wrote:
Hello,
While using the 'at' command it works when I pipe the command I
want to schedule to 'at'
So
$ date | at now + 2 minutes works well.
but
a) $ ls -l | at now + 2 minutes accepts the job, but gives a very
strange output in /var/spool/mail/root....
b) $killall <exec name> | at now + 2 minutes results in killall
getting executed immediately...
Am I missing something while using 'at' with those commands which have
some parameters/switches.
Also how do I get the output on the screen instead of .../mail/root..
Do I use some other command to schedule jobs using shell scripts.
Thanks,
R C
You're actually inserting the output of 'ls -l' and 'killall' into at.
It kinda makes sense at does not understand it.
The pipe '|' passes STDOUT of one process through to STDIN of another
process.
Output of at is sent to the mail spooler because at does not run in an
attached TTY. It's a service that runs in the background, so it cannot
output stuff to the TTY from which you inserted the task.
But erm. If you really just wat to delay stuff a bit, you might try
using 'sleep' instead.
'sleep 120 && ls -l'
-R-
.
- Follow-Ups:
- Re: Need help in 'at' command
- From: Peter Ludikovsky
- Re: Need help in 'at' command
- References:
- Need help in 'at' command
- From: R C V
- Need help in 'at' command
- Prev by Date: Re: IPV6 Networking, best practices?
- Next by Date: Re: Need help in 'at' command
- Previous by thread: Re: Need help in 'at' command
- Next by thread: Re: Need help in 'at' command
- Index(es):