• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux "nice" command

Red Squirrel

No Lifer
Is there a way to make it so if I call up a bash script with the nice command that all commands called within that bash script automaticly are run at that same priority?

I want to add nice -10 in my cron jobs to make them run low priority but they call up gzip which then runs at normal priority, defeating the purpose.
 
-10 is high priority, you want higher numbers for lower priority. Nice the script itself, all child processes inherit the priority of their parent. Although IIRC cron automatically starts all of it's jobs at a lower priority of either 5 or 10.
 
Oh my bad, but when I tested with -10 all the scripts run off the original script were running at 0, so there must be a parameter I have to pass to nice to tell it to use same priority as all other apps started by the script ran at 0. But if cron does it automaticly then I may be ok to not touch it.
 
If the bash process running the original script is -10 then all commands started by it will be -10 as well. It's always been that way AFAIK. And again, if you want them to run at _low_ priority then you want higher numbers, negative numbers are higher priorities.
 
Back
Top