Short Cycling

Check your water drain on the bottom. If a spider or bug makes a nest the water builds up on the coils and freezes. Make sure it is dribbling out water. If not a small amount of compressed air can clean it out.
Also- if your Freon is low from a leak- it will short cycle. Not enough pressure. When ambient temp it may be just enough to get it going but as it heats up and stuff expands there is not enough pressure to keep the compressor on.
Ac gauges need to be used to see if you have the proper pressures for the system.