tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Williams, David J" <David.J.Williams () au ! faulding ! com>
To: tru64-unix-managers
Subject: How to set the process priority for an su - <username> -c <comman d>
Date: Mon, 08 May 2000 09:52:46 +0000	[thread overview]
Message-ID: <96079346819466.tru64-unix-managers.marc@archive.invalid> (raw)

I was wondering if anyone knows how to run a user's crontab jobs at a
priority other than the default priority.

The /var/adm/cron/queuedefs file states that the default nice value for cron
events is 2.

We would like to be able to schedule the execution of scripts from the
batchjob user account with a priority higher than 2.

We have thought of issuing a command such as follows from the root account
but this doesn't seem to work:
/usr/bin/nice -n -2 su - batchjob -c 'sleep 100'

This always seems to result in the following process:
# ps -A -o user,pid,ppid,nice,command|grep -v grep|grep -E 'sleep|USER'
USER        PID   PPID  NI COMMAND
batchjob  26385   9729   0 sleep 100

The sleep command, used as an example, is running under the batchjob account
but with a priority of 0.

Running this from root's crontab generates the same result:
26 18 * * * /usr/bin/nice -n 2 su - batchjob -c 'sleep 100'

# ps -A -o user,pid,ppid,nice,command|grep -v grep|grep -E 'sleep|USER'
USER        PID   PPID  NI COMMAND 
batchjob  18755  27406   0 sleep 100
root      27406    608   0 sh -c /usr/bin/nice -n 2 su - batchjob -c 'sleep
100'

Any help would be greatly appreciated.

Please respond directly to me and I will summarise.

T.I.A.

David

David J Williams
Technical Specialist
Information Services
F H Faulding & Co Limited
Tel: +61 8 8408 3450/ Fax: +61 8 8408 3500
mailto:david.j.williams@au.faulding.com
<mailto:david.j.williams@au.faulding.com> 
http:www.faulding.com

                 reply	other threads:[~2000-05-08  9:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox