There are better examples in my opinion than just doing something at 18:00 every day. There's a technique called habit stacking where you identify all the habits you already have at a given time (like when you first wake up), and then you add one more at the end. It's easier to introduce a new habit this way, and it becomes ingrained more quickly, resulting in less need to use executive function.
There are still more techniques. An example from my personal life: in my whole adult life, I've never gone to the gym... unless I sign up for a gym that's right across the street from my workplace. Then it happens like clockwork. If all I need to do is walk across the street, I end up in the gym, and inevitably, I work out. If I need to drive 20 minutes though, well my willpower just ain't that great, so it basically never happens.
The best book I've read on this topic is Atomic Habits by James Clear. He goes deep down the rabbit hole of these techniques you can employ and touches on the research it's all based on. The brain's not a computer so I mean it's not all just going to come together automatically, but in my experience this stuff does work.