I think we all have answered something...or nothing,....
Let's break it down.
1. The compressor rods broke and the thing ran forever.
2. He wants it to shut off after he turns it on...without thinking about ...it in 30 minutes.
a pressure control switch will do nothing...there is no pressure being built up with broken rods...thus it will not shut off.
You need a timer. Any department store will carry one which plugs into the outlet, and the compressor plugs into that. You can set it to come on at say 9 am and shut off at 9;30 am every day. Or you can buy a timer like the heat fans in bathrooms and jacuzzis to run for a little and run out. Kind of like ...set it and forget it.
Good catch Tool Guy,, and to those with all those wonderful ideas.

And to anyone who took the time to answer.