Of course there's no one way a song comes to be. Sometimes it's a melody that comes to you, sometimes just a concept and you have to find the words to describe the idea. Other times you stumble on a nice chord progression or riff, some good music that needs fitting lyrics.
Surely it depends how much time you have and how frequently you can work, it also depends on how much head space you have and are you feeling creative. Creativity cannot be forced. You cannot summon interesting ideas whenever and only when you need them. There are times when I have space for work and I just don't feel like it. I'm not being lazy, far from it, but I don't have the energy or mood to be creative. Personally I believe it's in the stars or moon phases. Whatever the reason, you can free time and energy but sometimes creativity is just not with you.
For that reason, WHENEVER I feel it, any time I have something to work on I get to it, as I never know when it's going to end. When am I going to run out of ideas, or patience to set them to music. When am I going to just get tired of it, hopefully never. Probably more relevant, when is the quality going to decline...
I cannot work on a song or a part for more than about two hours. At two hours, I've heard the piece so many times that it no longer inspires me. I'm tired of it. I work much better skipping around different works-in-progress. At the moment, I have three songs I'm finishing the arrangements on, another idea that's begun, and a few more ideas that need fleshing out. I'm never without something to work on. So my work day goes like this: play the most recent song that I feel like and see a) is what I thought cool still cool, does it still inspire me and b) do I have anything to add or changes? If I feel inspired and want to work I will, if not, I'll pick up the next song the same way. When there's something that needs additional thought, I'll try to carry it with me in my day or when I'm going to sleep. Just ruminate on the concept or the progression until I find something I like.
So depending on the days and time you have, it can take a week or a month, or even much longer. I'd say I'm usually around a week. And then sometimes a song just falls out of you. Sometimes they come so fast that you don't even recognize the process, it's just here. This is something you can't expect, but it's great when it happens.