I do Yoga, Pilates and a little cardio. It is hard to decide what to do when. The Yoga I do doesn't require a lot of flexibility but I do sweat by the end of the 30 minutes. (Vinyasa by Rainbeau Mars). I tend to do the Yoga poses when I have time and want good stretch. Thus, I would say do it anytime.
If you take a class, pick a GOOD one. I took a beginner Yoga class that was very hard because while I am holding a pose, the teacher spends 10 minutes explaining the pose to someone else. I would be sore for days just from holding poses so long.
There are a lot of different ways to do yoga... one way is for relaxation, another for flexibility, another for strength... You just do which one suits your needs.
There are some asanas I can stay in for 30 mins+ and not have any problems.. A few are below... Although the upside down ones, you should be careful getting out of. The dizziness can be bad if you just flip up onto your feet and move.