Dozens, if not hundreds of times each day, we have to choose between things we want to do and things we should do: Stay in bed on a rainy Saturday or go to the gym? Scroll through memes or listen in on a boring conference call? Eat a slice of pizza or have grilled salmon?

Temptations don’t look the same for everyone — maybe you really would prefer the fish over pizza — but we all have desires that compete with our longer-term well-being and goals. Sometimes that desire takes the form of something new — a shiny novelty that we have to struggle to decline. But just as often, it looks like the temptation to abandon something that’s already underway. Getting what we want almost always involves powering through activities that are boring, unpleasant, or mentally draining. Getting in shape may require you to keep running on thet treadmill even when you’re aching to stop. Getting a raise could mean sticking with your study plan for a professional certification exam even if the process bores you to tears.

Fortunately, there are ways to hone your willpower in situations like these. New research published in the European Journal of Personality examined some of the most effective strategies for keeping up your willpower during uncomfortable or unpleasant tasks. Lead study author Marie Hennecke, a psychology researcher at the University of Zurich, explains her findings, how to apply them, and how to choose the right self-control strategy for the situation at hand.

This conversation has been condensed and edited for clarity.

Medium: Clearly, willpower is a hot topic — there are so many articles out there about how to conserve your willpower and how to increase it. Why is this a subject people are so interested in?

Hennecke: Willpower is important in so many domains of our lives. In work, school, health behaviors, and relationships, we need self-control to overcome distractions and urges that would lead us away from achieving what we want. Often, we’re drawn to things that might not be best for us in the long run. It could be evolutionary, like craving sweets and fats, which at one point in history were hard to get and valuable. Or it could be related to changing habits, like drinking a smoothie in the morning instead of eating a doughnut.

Studies have found that people with higher self-control can earn more money, do better at school and work, and are generally healthier and happier. Knowing this, I think people are interested in learning how to optimize it.

In your study, you looked at situations where people had to get through a task that was boring, difficult, or demanding physically or emotionally. Why did you want to focus on that type of willpower?

We realized that there wasn’t much research on these types of situations, on how often people spontaneously use certain strategies to power through unpleasant or uncomfortable situations in everyday life. By contrast, a lot of scientists look at willpower in the context of temptation, the classic example being Walter Mischel’s marshmallow test.

Temptations certainly test our willpower, but I think that there are two more types of situations where people experience self-control conflicts. One is when you have to do something but can’t get started on it, which is part of procrastination. The second is when you have to keep doing something you don’t want to do. Maybe it’s studying for an exam, going to the gym, or completing a work project, but persevering through the task can help us attain some larger goal.

You asked people in your study to list the strategies they use to persevere through unpleasant tasks and to rate how effective these strategies were. What did you find?

The No. 1 strategy that people used was focusing on the positive consequences, which they did in more than a third of unpleasant situations. This approach includes reminding yourself why you’re doing what you’re doing. For example, if I’m on the treadmill and I hate it, I might think that if I continue, the benefits will be that I’ll become fitter or better able to run the race I am training for. Other strategies were thinking about the near finish and task enrichment, which is adding something positive to the activity, like listening to music during a run.

We were also curious to know if participants who had high trait self-control — meaning they generally have good willpower and it comes easily to them — used different strategies that made them successful. We found that these people were more likely to focus on the positive consequences, set goals, and use emotional regulation or try to stay in a good mood.

Unfortunately, we couldn’t prove that these strategies were what made them good at self-control, but what this did show is that there can be many different paths to successful self-control. There are also various strategies that can help you persevere when you don’t want to, and it could be a matter of choosing the best one for that particular activity.

So different strategies seem to work better in different situations?

We think so. If an activity is really mentally effortful, like studying for a test or writing a memo, you probably wouldn’t use something like task enrichment — like playing music or listening to a podcast — because that might distract you and make it even more difficult to continue. But task enrichment could be a good approach if what you’re doing is more physically challenging, like exercise.

Let’s say you don’t enjoy tidying up. There’s no point in trying to find the joy in scrubbing the floors. It may just be all right to think, “Okay, when I’m done, my apartment will be shiny.”

Focusing on the positive consequences can be situational, too, and would probably be more effective if you are doing something that only brings you external rewards as opposed to internal rewards, which would be feelings of joy, accomplishment, or purpose that come just from doing the activity. Let’s say you don’t enjoy tidying up, but you do like the way your apartment looks afterward. In this case, there’s no point in trying to find the joy in scrubbing the floors. It may just be all right to think, “Okay, when I’m done, my apartment will be shiny, and my roommates will be happy.”

We think that a lot of people focused on positive consequences in our study because they were reflecting on tasks that they didn’t want to do in the first place, so they were most likely searching for those external rewards, like a raise or a more muscular body or validation from others. In these cases, reminding yourself of the benefits can give you motivation to keep going.

Distraction came up in the study as a strategy that was not helpful. Why do you think that is?

We think it could be because when you realize that you have other things to do, sometimes more enjoyable things, it might not motivate you to keep going in what you are doing. That being said, distraction could be helpful when you are facing a temptation.

What other willpower strategies seem to work when you’re faced with completing a task that you don’t want to do?

As I mentioned earlier, sometimes it’s not just about inhibiting undesired impulses in the moment. We think that people who seem to have more self-control aren’t just good at shutting down temptations, they are successful at avoiding temptations and distractions, have good habits, and tend to think of their daily activities as fun and interesting.

If you frequently do things that you don’t enjoy, it may not be a matter of willpower to get you on task, but rather switching the task completely.

That’s important. If you frequently do things that you don’t enjoy, it may not be a matter of willpower to get you on task, but rather switching the task completely. Exercise is a good example: If you hate running, it might be better to take up rowing or dance instead of trying to power through running with a strategy like task enrichment. Unsurprisingly, people who enjoy their habits tend to stick to them, and people with higher self-control tend to have more good habits.

Is willpower something that a person can improve?

Absolutely. Self-control, like all personality traits, is to some degree genetic, and like all personality traits, it’s fairly changeable. We are currently seeing an emerging number of studies showing that people can intentionally change their personalities — they can become better at being conscientious, extroverted — if they set their minds to it. But becoming better at self-control may be about finding the appropriate strategies, forming good habits, and avoiding or modifying situations that are tempting, boring, or unpleasant.