Operating System - HP-UX
1854922 Members
4473 Online
104106 Solutions
New Discussion

using the "at" command to set off shell scripts

 
SOLVED
Go to solution
ART BONAR
Occasional Contributor

using the "at" command to set off shell scripts

When using the "at" command to run shell scripts which will fire off Oracle Storage Procedures to parse files, get the following message:
"sh[18]: ulimit: the specific value exceeds the user's allowable limit."

Our customer wants to be able to set off 5 off these scripts at 10 minute intervals. Wen she trys, the first one will work, but then the rest of her scripts will not work.
Now she can set these scripts off manually, and they will work fine.

What is it with the "at" command? Can someone please help?
My name is really Kathy and my email add. is kamcgoha@day.disa.mil
7 REPLIES 7
John Palmer
Honored Contributor
Solution

Re: using the "at" command to set off shell scripts

The ulimit error is a known problem at 10.20 and can be fixed by amending the file /var/adm/cron/.proto from:-

# @(#) $Revision: 27.1 $
cd $d
ulimit $l
umask $m
$<


to:-

# @(#) $Revision: 27.1 $
cd $d
if [ $l = 4194304 ];
then ulimit unlimited
else ulimit $l
fi
umask $m
$<

This shouldn't prevent her second and subsequent scripts from failing though... could you provide some more details?
federico_3
Honored Contributor

Re: using the "at" command to set off shell scripts

modify the /var/adm/cron/.proto file to resolve the ulimit warning.

This file should be:

cd $d
if [ "$1"= "4194304"]; then
ulimit unlimited
echo was number
else
ulimit $1
echo was unlimited
fi
ulimit
umask $m
$<



federico
James R. Ferguson
Acclaimed Contributor

Re: using the "at" command to set off shell scripts

Art:

Edit /var/adm/cron/.proto and replace the line "ulimit $l" with the following:

if [ $l -eq 4194304 ]
then
ulimit unlimited
else
ulimit $l
fi

...JRF...
Devbinder Singh Marway
Valued Contributor

Re: using the "at" command to set off shell scripts

One other thing to check is /var/adm/cron/log file for errors. because it could be the c queue has reached its maxium of 100 ( i..e number of processes that can run) This error will be in the log .
If the maximum has been reached , jobs will not run
if this is the case to solve this edit /var/adm/queuedefs file and add entry c.200j .

HtH
Seek and you shall find
ART BONAR
Occasional Contributor

Re: using the "at" command to set off shell scripts

Thanks for all the responses so far. After editing the .proto file, I had to wait on
my customer so that she could try it out. She did and then her jobs would not
run. I then checked the cron log and it said,
"rescheduling at job (gave date & time) a queue max run limit reached (gave date & time).
I saw where I needed to changed the queuedefs. On the first line, I put
a.40j1n.
I asked customer to start the jobs again, but they still did not start.
I sopped and started cron, but this did not help.
Also, if the jobs were rescheduled, where do I go to cancel them out?
I would appreciate some more help, thanks!
My name is really Kathy and my email add. is kamcgoha@day.disa.mil
James R. Ferguson
Acclaimed Contributor

Re: using the "at" command to set off shell scripts

Hi:

# at -l #...lists jobs...
# at -r ...cancels (removes)...

...JRF...
John Palmer
Honored Contributor

Re: using the "at" command to set off shell scripts

Hi Kathy,

You ought to change your name in 'My Profile'.

'at -l' will give you a list of queued at jobs and the time they are due to start eg:-
at -l
user = root 970974000.a Sun Oct 8 04:00:00 2000

You can delete an entry with 'at -r', for the above that would be:-
at -r 970974000.a

The job files are to be found in /var/spool/cron/atjobs.

Hope this helps,
John