For the most critical tasks, like taking my medication, I have what I like to call "sacred rituals". These are things that must be done the same way at the same time, every time. They are "sacred" because nothing, and I mean absolutely nothing, comes before them.
When I get out of bed in the morning, the first thing I do as soon as my feet hit the floor is take my daytime meds. Nothing else is permitted before that. At 7:00 PM sharp, I stop whatever I'm doing and go take my night time meds. To me, these are rules, not simply suggestions. If I break these rules, I WILL forget.
To manage everything else, one of my "sacred rituals" is that if it's going to happen, as in I'm going to do it, it has to be written in "the book". If it's not written in the book, I'm not going to do it. "The Book" is a leather bound planner that runs my entire life. If it's something I need to get done, I write it in the book, do it, and check it off.
I guess it's kind of ironic that a software engineer relies on pen and paper to run his life but I've been doing it that way for a long time and it does the job.