Sounds like the system has a low charge, there's a pressure cutoff switch that shuts down the compressor to prevent it from burning up. Look for signs of a leak at the A/C fittings. You'll see an oily residue (probably caked with dirt) that's a sure sign the refrigerant has leaked out.