I'd say as long or as little as you want to, it has to do more with how you've progressed than how long you've been training. (I see guys at the gym that have probably trained for 5+ years, and they still don't know shit.)
I'd tell you two things though:
1. If you just started lifting you can gain a surprising amount of mass and strength being 100% natural, and just using stuff like creatine.
2. If you havent lifted long enough to actually know what the hell you're doing (how to properly train, how to properly eat, how to listen to your body and pay attention to what it's telling you) then you're just wasting your money on a cycle. You can take the biggest dosages and the most expensive steroids you want, and if your training and diet are shit you're not going to get anything out of it except an empty wallet.