Skip to content

Instantly share code, notes, and snippets.

@rietta
Created February 28, 2013 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rietta/5057592 to your computer and use it in GitHub Desktop.
Save rietta/5057592 to your computer and use it in GitHub Desktop.
Have a shell script always run with a nice, low priority
#!/usr/bin/nice /bin/bash
#
# Your script goes here....
#
# Now when this script is run from the command line as ./run_as_nice.sh, it will execute with lower
# priority to avoid causing the load average to spike as much.
@rietta
Copy link
Author

rietta commented Feb 28, 2013

I got tired of always typing:
nice backups.sh

:-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment