Add job locking

Hi!

Add job locking for the ability to run in parallel.

Thx.