Shell Scripting not showing in process when it goes to sleep

Hi All,

Here is my script:

sleep_time=`echo  "9.6 * $num_servers"|bc| cut -d. -f1`
if [ "$sleep_time" -lt 3600 ]; then sleep_time=3600;fi
### Allow the compare script to kick in after 1 hour at the least
logger "Sleeping for $sleep_time seconds ...Will call compare.sh thereon"  $act_log
sleep $sleep_time
#sleep 1200

logger "Calling compare.sh script to draw report" $act_log
./compare.sh

This is going around 3 hours sleep and I'm checking ps -ef for this script and I'm not able to see this script is running. Is this normal behaviour?

Thanks,
Gobinathan.S

No.

Are you sure about ps not showing the process?

yes, The Script name is Inject.sh and I'm doing 'ps -ef | grep Inject.sh' it's not showing anything. It was showing till before it's goes to sleep command.

Please help me out to not to terminate the script while sleep begins.

I guessed you also checked the value of your variables sent to the log by logger. Otherwise, I don't see any reason why that script shouldn't sleep.