Life stability.

Happiness.

In that order. The balance between these two is something I need to maintain in order for me to say whether or not it's time to switch the job.

Happiness is a lot of things. This is a personal compass. For me it's a combination of doing work that's interesting, working with a company whose mission I believe in personally, while having a good life balance. If I say I'm signing out and saying bye at a particular reasonable time on any regular(!) day, and that's respected, that's good enough for me.

Life stability means do I have the means to support myself and those around me reasonably well. This is actually the primary point Sometimes the jobs that make me happy might not pay me all that great, but if I'm at a point in life where maybe other investments are paying off well, or I just don't need to have that much money, I can take the job. On the other hand I can have a job that pays me lots of money but I'm really really not happy with it. But sometimes it's necessary to suck it up until another opportunity comes to me. I can't just flip the bird to life's responsibilities and quit because I'm not happy. Sure maybe I readjust my needs to make stability to look cheaper, but the point is that all basics MUST be covered at all times.

Real world examples:

Second job of mine. The company vision had changed considerably since I joined it. After a merger it became less about innovation and while I don't say it's bad, I definitely didn't agree with it. At the time it was just my wife and I living in a not so expensive apartment and we had very few other responsibilities. So I quit. Admittedly to a slightly better paying job but the priority at that time was happiness since I had achieves baseline life stability (and a bit more too).

Didn't like the new job at all. Burnt me out and after 6 months I left to a new job. This was paying me less than my second job so quite a dip in earnings at the time. But it was exciting, and I loved so much of it. Again I was just about fine with stability since my wife was also working so the primary balancing factor was happiness.

6 months later though, my wife and I were expecting our son. This flipped the equation completely. My wife really was hoping she could exit the workplace so she could spend time with our baby when he was born and this meant a big change in stability requirements for me. I actually went back to the same business I had my third job with. It was a new product they were building so I expected it to be different this time around. That turned out to be wrong. I won't lie. I hated it. But I sucked it up to the point of near depression. Since the balance was starting to fall out of place, I hunted another job and I hope I've found my perfect place at Buffer. Right now it's everything I could ask for and has all my guiding principles in place.

Hope that lengthy exposition of my career helped out :D

Side note - Leaving the company I worked at twice was a hard one and led to a lot of tension. I felt horrible about bits of it, but I couldn't let my personal mental health deteriorate any further. I regret that I had to put the company through that as it almost felt exploitative (that was never my intention though). We parted on lukewarm terms but now have better relationships which mended slowly (not fully) over time.