Better schedule or LOR-potential?

I have the choice between taking a class with a professor who I know likes me and would be willing to write me a letter of recommendation, or a class that meets earlier and gives me a better shot at finding a job that fits my schedule.

What I’m afraid of is that the professor won’t like me as much and I’ll end up losing out on a LOR (I plan on applying to grad schools). But at the same time, what if I lose the opportunity for research (relevant to my major and future plans) because of an inconvenient schedule? What is the better option?

Both are in the same field if that helps.

If you need the job/think you can get a research opportunity only if you take the convenient class time, I would do it. If you are already close to the other professor, just send them an email and see if they want to meet for coffee or talk in office hours or something. They won’t be offended that you didn’t take their class