Looking for a way to make my php cron job to sleep if the CPU use gets too high lets say it sleeps for 30sec - 1 min and checks the CPU and if its still too high it sleeps for another minute or so and keeps doing that until the CPU use had gone down

Dose anyone have any idea how to do this without breaking the script?