Treat Setbacks as Stepping Stones and not Obstacles. If you are building a house and break a few nails, it doesn’t mean to stop building! There will be setbacks, lots of them. Look at them as stepping stones to your goal only. Something like tests you must pass.
The best solution for this is to carefully think about what time of day you would be the most willing and the most comfortable with exercising. If it is first thing in the morning (which is the best time in my opinion), or at another time during the day, then make sure you stick to that time consistently. NEVER do workouts when it is too difficult for you to commit to this specific time on a consistent basis.