1. Give a certain number of warnings before implementing the big consequence. It might be best to have some visual ways to keep track (e.g., posting a paper checkmark up on the wall, holding up the number of fingers corresponding to the number of warnings given).
2. Break the large penalty into parts. For example, the 30 minute recess would be lost in 5 minute intervals. Each infraction or refusal results in a deduction of 5 minutes from recess. For older kids, you might allow 15 minutes to eat lunch (perhaps in your room), and the rest of the time is spent writing an essay. Or perhaps with adolescents you could remove increasing amounts of time from the passing time to the next class. If they are allowed 5 minutes to get to the next class, you remove 30 seconds of hall time for every infraction or refusal. Allow 2 minutes for the hallway passing (enough time to get to class, but no time to socialize).