1753284 Members
5431 Online
108792 Solutions
New Discussion юеВ

at command syntax

 
SOLVED
Go to solution
so.nimda
Super Advisor

at command syntax

hi all,

can anyone help me with the syntax?...

tried executing "at now ./script.sh" but it returned an error "bad date specification"

i would like "script.sh" to be executed immediately... think i'm confused with the tru64 syntax... :(

thanks in advance...

:)
7 REPLIES 7
Michael Denney
Valued Contributor
Solution

Re: at command syntax

Try this:

at -f ./script.sh now
Christine Hartman
Valued Contributor

Re: at command syntax

try at -f script.sh now
the man page for at is useful too
so.nimda
Super Advisor

Re: at command syntax

hi michael,

thanks ! it worked...

:)
so.nimda
Super Advisor

Re: at command syntax

hi christine,

thanks ! your command worked !... :)

tried the man pages but the syntax showed that the 'now' is after the 'at' as in 'at now'...

guess i'm confused... thanks for the help !!

:)
so.nimda
Super Advisor

Re: at command syntax

the syntax worked
Hoang Chi Cong_1
Honored Contributor

Re: at command syntax

Hi rancid

You can do like this:

#at -f "/tmp/script.sh" now

I do an example and the out put like:
#at -f "/script/fortest.sh" now
warning: commands will be executed using /usr/bin/sh
job 1136336270.a at Wed Jan 4 07:57:50 2006

Check for the result!

For more detail about at command you can see from the manpage:
#man at


Hope this helps
Hoang Chi Cong
Looking for a special chance.......
Andrew Merritt_2
Honored Contributor

Re: at command syntax

> tried the man pages but the syntax showed
> that the 'now' is after the 'at' as in
> 'at now'...

Yes, but in that case the commands to be run are specified in stdin. If you want to give the file of commands to run on the command line you need to use the '-f' option.

Andrew