It's discipline and systems. The fewer systems you have in place to enforce correct behavior, the more you have to rely on discipline. And discipline is a tough nut crack consistently.
Some of my favorite systems include:
* Social accountability. The human desire to appear reliable and consistent is a power to be taken advantage of. Get a partner, a co-founder, a mentor, an investor -- someone that you have to answer to occasionally. Tell them your plans, and check in with them to review your progress regularly. In other words, set yourself up to suffer a bit of embarrassment if you don't live up to your word.
* Batching. It's been said that you ship your calendar. If you think 40% of your time should be spent talking to customers, block off 40% of your calendar for that task. Don't allow yourself to write any code during that time. This is easier if you batch your work together. For example, I do this for my podcast. No coding allowed on Mon, Tue, and Wed, only podcast work.
* Front-loading. I have very little willpower to make the right decision in the moment. When I'm hungry, I'll turn to junk food. So I try to pick a singular time when I'm in the right headspace to make the right decision for my future self. I grocery shop when I'm full, fill my fridge and pantry with healthy food, and rob myself of the ability to make bad choices later. You can do this with customer conversations, too. For example, on Monday schedule calls for the next two weeks. You'll be more-or-less obligated to have those calls when the date arrives no matter how you feel at the time.
* Time boxing. Most of us are procrastinators. Procrastinators get the bulk of their work done just before a deadline. Use this to your advantage by setting lots of deadlines, which should ensure you have lots of productive periods. Make sure they're deadlines you can't break. I like to combine this with social accountability, meaning my deadlines are scheduled meetings or outings with other people.