A job cannot make you happy, but it can save your life. People spend so much time looking for that perfect job, the perfect boss, the salary that will finally make them feel secure. But in fact, the impact a job can have on your life is overrated. Unless your life is completely falling apart. Then a job can save you. I know because I have seen this many times in my own life.

When we think about a job saving someone, we usually think about people in poverty. For example, Richard Easterlin, an economics professor at the University of Southern California found that earning enough to pay for food and rent can drastically change the lives of people in poverty–and give them the ability to achieve happiness. But he found that anything beyond around $40,000 a year does not have much impact on your level of happiness.

The reason for this is that our happiness comes, for the most part, from the amount of optimism we have. Daniel Gilbert, in his book Stumbling on Happiness, spends 300 pages talking about all the research that shows how misguided we are about our ideas of happiness. The biggest mistake is thinking we can influence it much. Mostly, we can’t. Mostly we have no idea what will make us happy in the future — although we think we do.

What’s the best way to influence your happiness? Personal relationships. People with strong, supportive personal relationships are happier than people who are isolated. The statistic that best shows this comes from Dartmouth College economics professor David Blanchflower.

He says if you go from having no sex, to having sex once a week, you will have a large jump in happiness. This research isn’t about orgasms. It’s about forging reliable, steady relationships that you make time for every week. It’s hard to measure that, but sex is a good way.

So back to the job. Imagine someone who hates her job. If she’s fallen in love, she’ll have that glow about her even though her job is boring. Because love trumps interesting work in the happiness charts. And imagine an inherently optimistic entrepreneur whose business fails? She probably starts another business. Because an optimistic outlook often trumps reality, for better or worse.

Trying to influence your natural set point for optimism is like trying to influence your natural set point for weight. Your body pushes to go back to where it was, no matter how you try. So only the most extreme diet can move an inherently husky woman into skinny-girl mode. And only the most extreme job situation can move an inherently optimistic person into the realm of negativism.

Here are attributes that The Economist reports that your job must have in order to make you feel productive and happy about your work:

1. Stretches a person without defeating him

2. Provides clear goals

3. Provides unambiguous feedback

4. Provides a sense of control

The range of jobs that meet these requirements is wide. And they include jobs you might not expect. For example, hairdressers report they fire clients who treat them poorly, and janitors say that they get feedback from the people who are happy the floors are clean. Conversely, lawyers report having little control over their goals, since the clients frequently change them, and that they have little control over outcome because they are beholden to a judge, jury or ambiguous law.

So a job cannot make you happy, even if you wish it could. But it can save your life. People report that in times of extreme negativism and sadness — depression, poverty, or complete lack of connection to the world — a job has saved them. I have found in my own life, and experts agree, that work can rescue a dangerously unhappy life by providing routine, a connection to other people, and the feeling of contributing to the world.

Martin Seligman is a professor of psychology at the University of Pennsylvania, and founder of the positive psychology movement that is behind most of this research. He encourages people — those at the far edge of unhappiness and the more optimistic as well — to spend time and energy learning how to increase their optimism set-point.

He explains how in his book Learned Optimism: “Positive psychology is not only about maximizing personal happiness but also about embracing civic engagement and spiritual connectedness, hope and charity.”

These are the things a job can give you that matter. Wyeth Windham grew up in Montana. His dad was gone and his mom cleaned houses. He was bored in school and hung around with kids who did poorly. He had little future. In his junior year of high school, he started volunteer work with a group that funded youth programs. Six months later, while Wyeth was involved in his work every day, his friends robbed two restaurants.

It was a turning point. Windham saw, maybe unconsciously, a literal example of how work can save you. And he stuck with it. He was the youngest member of the board at his local Boys and Girls club. And an Oprah Winfrey fund recognized his achievement and sent him to college on scholarship.

Today he works at PrintingForLess.com, and recently, he visited Boston for a conference about digital printing. He has a good job, to be sure, but what matters is feeling a part of a larger community, and a spirit of connection to the world. So he skipped out of the conference to walk the historical Freedom Trail of the American Revolution. And this just might be a good little lesson in career happiness for us all.