How many years to stick in a comfortable job?

Hi ,was just wondering ,whats the time period a person must spend in a job thats comfortable salary wise, but no growth or long time career prospects:)

Anyone in here to share views?

Here in the UAE, that would be 2 years !