You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Locks in the JobScheduler stop the execution of a job, as long as a particular lock has been acquired by one or more jobs. Locks are available for individual jobs and for jobs in job chains. Should a job be waiting for a lock to be released (lock contention), then it will be automatically started as soon as the lock has been freed.

First you have to create a lock then it can be acquired by jobs.
For example open the folder ./live/lockExample/ in JOE.
We create the lock "testLock"

and three jobs "job1", "job2", "job3" where "job1" use the "testLock" exclusive and the other non exclusive.

You can download these an Example here.

We start the jobs in different orders to see what happens

  1. job1 -> job2 -> job3
    In this case job1 holds the lock exclusive and job2 and job3 don't start until job1 is finished and release the lock.
  2. job2 -> job3 -> job1
    In this case job2 and job3 start both because they hold the lock non exclusive. job1 wants to use the lock exclusive so it doesn't start until job2 and job3 are finish and release the lock.
  3. job2 -> job1 -> job3
    Same behavior like case 2.
  • No labels