Don't break the chain.
I will now, in front of all, confess that I have never been a big Seinfeld fan (I watch a lot more My Little Pony!), but for whatever reason, one of the most helpful habit-building tools is strongly associated with Jerry Seinfeld. It's the idea that whatever you do, you try not to break the chain.
The idea is simple: pick a habit, chore, or item you want to be more regular about completing. Then, you print out a calendar, or make a checkbox form, or get an app, and every time you do it, you mark that day off. The thinking is that seeing those chains, or streaks, add up will motivate you to keep up the habit for fear of breaking the chain or streak.
Decide what you'll do about weekends, vacation and sick days. If you know me at all, you know that I'm a big fan of setting the boundaries that work for you.
I'd also encourage you to be specific about what the goal is - if you want to "write" every day, does that mean "anything that moves your project forward"? "500 words"? "25 minutes of focused work"?
Don't feel too bad about breaking the chain - it happens! We just start again. The real tragedy would be never trying again, not that the chain was broken.
This can be effective for long or short term goals - you could try and do something every day for a year, or for 100 days, or for a month. The secret is making your progress visible - and feeling good about the chain as you build it.