The best way to prevent yourself from falling into old routines, bad habits or harmful sins is to recognize those things or situations that lead you to commit them.
We all know the bad habits or sins we commit on a daily basis, and most of the time they are preceded by something that can be prevented, or at least changed.
The key is to begin each day recognizing those situations and setting up barriers to protect yourself.
This is how The Catholic prayer book and manual of meditations explains this morning spiritual exercise.
Make a firm resolution to commit no sin during the day. Be on your guard, especially against your most frequent and besetting sin. Consider well all the dangers and occasions of sin, which you are likely to meet with, and reflect upon the means by which you may escape from them. Make a firm resolution to resist every temptation which may fall in your way, and ask of God the necessary grace to do so.
Whatever sin is most difficult for you to resist, you can begin each day by thinking about your schedule and any possible temptations the may arise. Then you can create a game plan, where you take deliberate steps to prevent yourself from falling into those bad habits or sins.
Above all, if you want to progress in the virtuous life, you need to be deliberate and plan ahead.