From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079346819466.tru64-unix-managers.marc@archive.invalid> From: "Williams, David J" Date: Mon, 08 May 2000 09:52:46 +0000 To: tru64-unix-managers Subject: How to set the process priority for an su - -c X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079346819466 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 http:www.faulding.com