This seems very strange. On a new install of Debian Squeeze I can execute a shell script directly via command line and the service will take about 30 percent cpu. If I make a crontab execute the script, it takes a LOT more cpu (according to top).
#My crontab entry
* * * * * /home/george/NWN/nwn_restart &> /dev/null
The following is the called script ...
# NWN Server Process Monitor
#Get in the right directory
# Command to run
RESTART="./nwserver -module Earthspur"
#path to pgrep command
# daemon name
# find pid
if [ $? -ne 0 ] # if not running
Once again, I can type ./nwn_restart on the command line and the service uses 30 percent CPU ... if I wait for the crontab to execute the script, top says 152% (on a dual core system)
Thanks for any tips. This is driving me batty.