add pseudo semaphore to avoid multiple jobs at same time