I've seen many authors share their advice on a writing routine, with most starting with the idea of 'write every day'. I'm sure that's good advice and all, and I don't have any counter argument against it, but I've found it interesting to note what actually works for me.
When I started to write seriously I dedicated time for writing. I had a 'regular' job so I would try to write for an hour or two before heading in to work. Even though I would have more free time at the end of the day, I was normally mentally tired from the day and unable to focus after getting home, making dinner, cleaning dishes, etc. That every day routine helped me develop discipline and proved (to myself) that I could finish things and produce a large quantity of words. But it wasn't always the best stuff.
Now that I have the whole day free, the mornings are still the most productive. My mind is fresh and my energy high. And once I start going I can keep going as long as things flow. And that's an important thing. Writing is very much a endeavor of rhythm, and if you have to break that rhythm with something like a job, it can slow you down considerably. So I now find myself more productive without the time limit on my writing sessions. I force myself to start in the morning (by 9am at the latest) and work while the working is good.
But I normally run out of steam by mid afternoon. Or earlier. And then it's time for a break. I'll often keep thinking about the story, but stop writing. Have some lunch. Go for a bike ride. Work on website development. Anything to change the mental gears. The break may be for an hour, or maybe four. Sometimes that's it for the day. But if an idea hits, or the words come to mind, then I'll get back to the writing. Quite often it's after a full break and late in the evening that the keyboard will beckon. And then I'll resume writing as long as the rhythm is there.
So that's a writing day. But I actually think it's good to take some days off completely. Don't write at all. Don't even think about it (that one's hard). Don't just switch to some other story (I can't work on multiple stories simultaneously - if I switch thoughts it's for at least several days). I find the more I rest the more energy I return with, the more things flow when I start typing. The difference in quality between forced writing and natural writing is quite obvious when I look back at it. So it's worth it to find your own rhythm. But that 'write every day' thing is a good place to start..