Always keep an eye on the market, keep an eye on your current surroundings, always keep your resume up to date, and be better than me - keep your interviewing skills fresh. Those are probably just the basics of survival.
As far as when and for what reasons to jump ship that's largely up to you. You will almost never get the same from a raise that you will for switching companies, so if money is your motivator keep that in mind. Do you see the writing on the wall? If so then hopefully you've been doing the basics of survival to get you out of there (I always neglect interview prep then coming running to The Coli complaining
). shyt management in your org but like the company? Look internal first. You could make a diagonal move and net some better pay. Above all though, move when it makes sense to you and not to others, because they don't have to live your life. You can let other people inform your decision, but don't let them make your decision.
But fukk any and all sense of loyalty to where you work. When it's time to go, it's time to go.