1846313 Members
3526 Online
110256 Solutions
New Discussion

at and batch jobs

 
SOLVED
Go to solution
Kris_5
Occasional Advisor

at and batch jobs

Hi Folks,

I have a typical problem in using at
and batch commands. I have a shell
scripts which takes various parameters
as input and I want to submit this
using at or batch. I though to use
cron, but it doesn't allow me to select
a queue. Thanx in adv.

for e.g.

$ at now + 1 minutes
The command failing to recognize the variables -a a, -b b etc.

Kris
6 REPLIES 6
Santosh Nair_1
Honored Contributor

Re: at and batch jobs

Try doing the following:

$ at now + 1 minutes
test.sh -a a -b b


where is a carriage return and is a control-d, i.e. end of file.

-Santosh
Life is what's happening while you're busy making other plans
Robin Wakefield
Honored Contributor
Solution

Re: at and batch jobs

Hi Kris,

You should run it like this:

echo test.sh -a a -b b | at now + 1 minutes

If you are still seeing problems, are any errors appearing in the user's mailbox?

Rgds, Robin.
Roger Baptiste
Honored Contributor

Re: at and batch jobs

Krishna,

How about using the
-f option to specify
the script file in the at
command.
at -f test.sh .....

or how about specifying
the options to the script
as the options to the
at command
at -q a ....
Or

do echo ""test.sh -options"" | at command

HTh
raj
Take it easy.
A. Clay Stephenson
Acclaimed Contributor

Re: at and batch jobs

Hi Kris:

I think you will have better success with something like this:

at -f test1.sh now + 1 minutes

test1.sh then invokes test.sh -a a -b b


If it ain't broke, I can fix that.
Kris_5
Occasional Advisor

Re: at and batch jobs

Folks,

The following command looks promising.

echo "test.sh -a a -b b"|at now + 1 minutes

In the result

$ at -d 1004109278.a

....
...
cd /opt/ORACLE/oclin/40/dev/aot/admiral
ulimit 4194303
umask 2
test.sh -a a -b b

Looks like it is submitting the job with parameters. Thanks again

Kris
Robin Wakefield
Honored Contributor

Re: at and batch jobs

Hi Kris,

You may want to prefix the script filename with ./ in order for it to work 100%.

Rgds, Robin