By fits and starts

Meaning: Irregularly, with periods of activity followed by periods of inactivity.

Example: He has been learning Spanish by fits and starts.