I live on a different continent than my family, which can make visits home tricky. As a sober person and self-scheduling freelancer, I rely heavily on routine to keep me feeling grounded and productive.

When I cross back over the familial threshold, though, I’m both out of my element and eight hours ahead of my usual time zone. When jet-lag makes it all-but impossible to wake up before noon—let alone do the things that normally have me at my desk at six sharp—I quickly turn into a snarling, door-slamming monster. This, as I’m sure you can imagine, is delightful for my family.

The specifics here are mine, but the shape of this difficulty is common. There’s been a lot of wisdom around in recent years about the power of routines, and many of us have listened, harnessing routine as a tool to help us live our best lives. But what can we do when life gets in the way?

Mix things up before you have to

Diann Wingert, a certified life coach and licensed psychotherapist who frequently helps her clients to establish and maintain routines, says if you’re a person who tends to ruminate or get “stuck” on ideas, you can anticipate life’s inevitable disruptions by introducing some variability in your routine from the very outset.

“The key concept,” she says, “is that you anticipate that you will have difficulty maintaining the routine or certain aspects of the routine, and instead of bracing yourself and fighting that when it happens, you don’t resist it, you anticipate it and you choose to vary the routine.”

This might mean that if you normally do a 20-minute Headspace meditation a day, you throw in a 10-minute session instead every now and then. You can also vary the time of day you do certain things and even the type of activity. Deliberate variations in your routine will mean you still benefit from the automation factor most days, but you’re not so rigidly attached to doing things a certain way that you, say, scream at the people who brought you into the world and storm to your bedroom.

Use if-then plans  

“If-then plans”—also known as “implementation intentions”—are a simple (and scientifically proven) solution to your goal-striving woes. If you’ve ever wondered why it’s so hard to stick to resolutions, it might be because, like many people, you’re mistaking goals for plans. “I’m going to get in shape” is a goal—and one you can easily wriggle out of time and again because you never said you were going to start right now, right? It’s much harder to argue with: “If it is Monday, Wednesday, or Friday morning, then I will go to the gym.” Or how about: “If it is 7 a.m., then I will work on my screenplay for an hour.” “If I am offered dessert, then I will say no.” You get the picture. The power of if-then plans is that once you’ve set the intention, your brain will be primed to react automatically when the situation arises. Dr. Peter Gollwitzer, a New York University professor who originated the idea of if-then planning, recently reviewed almost 100 studies and found that these plans have significant positive effects on pretty much any intention you might have.

If-then plans are also great for dealing with disruptions to your routine because a pre-planned reaction will help you to react calmly and remove the need to make decisions in the moment. Simply anticipate the disruption, then set your response—and remember to be specific; you need a plan that tells you exactly what to do and when. For instance, in my example: “If I wake up at noon, then I will excuse myself to work at 2 p.m.”

Don’t mistake a belief about yourself for a fact

During our conversation, Wingert caught me in one of my habitual thought patterns: “If I don’t write as soon as I get up,” I said, “I can’t write for the rest of the day, and I become furious.” Her response was simple but life-changing: “What we believe is true is true for us.” In fact, there’s no reason I can’t write later in the day, except that I’ve told myself I can’t do it, and then regimented that idea with a routine.

Wingert introduced me to a thought model she uses with her clients, which was devised by Brooke Castillo, founder of The Life Coach School. The Self Coaching Model is also known as the CTFAR Model, which stands for Circumstance, Thought, Feeling, Action, Result. Next time your routines are thrown off and you catch yourself getting antsy or indulging a destructive or self-soothing behavior (compulsive eating, zoning out in front of the TV), try writing that acronym vertically on a piece of paper, and start the exercise by writing down the action you’ve noticed, or the way you feel. (Note that you’ll start with the “feeling” or “action” items.) From there, you can fill in the result, then the circumstance, then the thought, so that your chart might look a little like this:

Circumstance: I’m jetlagged and out of my routine

Thought: I can’t write

Feeling: Antsy and irritable

Action: Slamming doors, being an asshole

Result: I’m not writing

The beauty of this model is that the result always proves the original thought. That means, even if the circumstance stays the same, you can get the result you want by changing the thought. To change your behavior, redo the chart by starting with the result and working your way back up:

Circumstance: I’m jetlagged and out of my routine

Thought: I can choose to write anyway

Feeling: Calm and focused

Action: Closing the door, putting my headphones on, and writing

Result: I’m writing

With these tools, those of us who’ve allowed our rituals to govern us or make us feel incapable can stop feeling trapped by them. Let your routine work for you, not the other way around.

The author of this post is an editorial contributor to Headspace. These are their views, experiences and results and theirs alone. This contributor was paid for their writing.