This can be the condenser fan not running in which case replace it. It could also be a dirty condenser, clean it will fix your problem. Another thing it could be is the start relay. All three of these problems will cause the compressor to cut in and out every few minutes but if the fan is running and the condenser is clean the start relay is the most likely problem.