Is any job better than not working?

When is it a good idea to take a job just to have a job regardless if it’s related to your career goals or not? Even if it’s a part-time job. Will it derail me from my career search? How can I take a job – any job – and still stay on track in my career path and goals? What advice/tips can you provide?