Consistency is key.
If you only write when you feel like writing, chances are you will never be an author. Most people don’t enjoy their jobs 100% of the time and writers are not the exception to that.
If you are going to be an author, you have to write. Writers write.
Even if all the time you have to write is 10 minutes a day, that is about 61 hours of writing after a year–which is more than you would have written if you didn’t take that 10 minutes.
What if you set your alarm and get up 30 minutes earlier? In a year you will have written over 180 hours.
One of the problems with creating a new habit is some habits are more difficult than others. If you can tie your writing habit to a habit you already have, you are more likely to establish the new writing habit as habit.
For example, if you hate getting up in the morning, setting your alarm early will probably just make you snooze it a lot and feel guilty. BUT if you love the smell of coffee and you set your coffee maker half an hour earlier, that can help you get up and moving. If you always sit at the table in the morning with your coffee, adding your computer to the mix may be the perfect way to make writing a solid habit in your life.