It’s not always easy to convince yourself to exercise after a long day of work. (Ok, it’s never easy.)

But people who consistently manage to do it may be using a simple trick—whether they realize it or not—according to a new study published in the journal Health Psychology.

The most consistent exercisers, researchers found, were those who made exercise into a specific type of habit—one triggered by a cue, like hearing your morning alarm and going to the gym without even thinking about it, or getting stressed and immediately deciding to exercise.

"It’s not something you have to deliberate about; you don’t have to consider the pros and cons of going to the gym after work," explains L. Alison Phillips, PhD, assistant professor of psychology at Iowa State University and one of the study’s authors. Instead, it’s an automatic decision instigated by your own internal or environmental cue.

The researchers wanted to see whether this type of habit, known as an instigation habit, was better than another type of habit at predicting who stuck with a month of exercise. At the beginning and end of the monthlong study, they asked 123 university students and faculty questions that assessed how often they exercised and how strong their exercise habits were—whether they did it without thinking, for example.

From these questions, they gleaned whether a person has a strong instigation habit—one where a cue triggers the instantaneous decision to exercise—and whether a person has a strong execution habit—that is, knowing exactly what kind of exercise they’ll do once you get to the gym, or being able to go through the motions of an exercise routine while being mentally checked out.

The only factor that predicted how often a person exercised over the long-term, they found, was the strength of their instigation habit.

It got stronger with time, too. "When people started exercising more frequently over the month and became more active, I saw that their instigation habit strength increased with that frequency, but execution habit didn’t really change in relation to frequency at all," Phillips says. Zoning out mentally during exercise didn’t have a negative effect, but it didn’t help a person adhere to a regimen, either.

That’s good news for newbie exercisers who might be intimidated by the same routine day in, day out. "In the long term, it seems beneficial, or at least not harmful, to have variety in your routine," Phillips says of the results. "A lot of people might shy away from starting to exercise because they think, oh man, I can’t possibly imagine myself doing this forever. They might think of one boring routine—running on the treadmill—and to them it sounds like torture, so they give up before they even begin."

Some repetitive behaviors do reinforce exercise, she says. "When you’re just starting to develop an exercise routine, I think it might be helpful to engage in the same behaviors, to have this patterned action." But sticking with a cue—instead of clinging to the same tired routine—appears to be what will get you back to your workout again and again.