It is not necessary to have the engine running when using an air compressor. However, if the compressor is being used for an extended period of time, it is best to keep the engine running to avoid overworking the battery. If the compressor is being used for short periods of time, the engine can be turned off in between uses.