How to prevent a job from being stuck in status 'Waiting for host'