> ------------------8<------------------8<--------
> #!/bin/sh
> SLEEPTIME=$1
> shift
> RUNTIME=$1
> shift
> PID="$*"
>
> while true
> do
>    kill -STOP $PID
>    sleep $SLEEPTIME
>    kill -CONT $PID
>    sleep $RUNTIME
> done
> ----------------8<---------------------8<--------
> To run at the shell prompt,
>   pgrep lame | xargs ./schedule.sh 5 1


Of course, you can stop and resume somebody else's processes if you
have root privileges only.

-- 
l...@iitd - http://tinyurl.com/ycueutm

Reply via email to