1

A quick question about how nice works.

Say if I have a script that runs in the crontab like so

0 4 * * * nice -n 19 /usr/local/admin/script.pl 

It is set to the lowest priority. This script will start other commands within it. Will these commands also be niced as well becuase the niced scrip started them or should all these commands have nice command added within the script?

dgibbs
  • 601
  • 1
  • 11
  • 22
  • Just pointing out that the `-n` argument is not the desired nice level, but an adjustment, that is, how much to add to the default nice level. Given that the highest nice value is 19, it would sufficient in the snippet above to use a value of 9 (unless the user default is set to something other than 10). – dskrvk Apr 07 '17 at 15:49

1 Answers1

1

Yes, that's correct. Every child process created by your script got the same prio as the parent.

Pascal Schmiel
  • 1,728
  • 12
  • 17
  • Thanks for confirming. I was looking it the child processes and wasn't sure if this was the case. Thanks for you help – dgibbs Jun 05 '13 at 12:25