![]() |
![]() |
There is often a requirement to interlock jobs, perhaps ones that have access to limited resources, so that only one job of a given type runs at once.
To implement this and other facilities, Xi-Batch maintains a second kind of object as well as jobs, which are called variables. A variable can have a numeric or string value. It is basically just a name and a value, although a comment may be attached for documentation purposes.
Access to variables is controlled, so that tests and updates on their value are said to be atomic, in other words if two or more processes (jobs or a user) attempt to update the value at the same time only one will succeed.
Alongside variables, jobs may have a number of conditions and assignments.
A condition limits when a job may start (apart from the target time which has been set). It tests the value of a variable against a given value. If the specified condition is not met, the job will not start.
An assignment sets the value of a variable at the start or at the end of a job. Note the importance of being "atomic" on start, in that if two or more jobs are dependent on a given condition applying and also set the variable in question, only one will "win".
Each job will try to start, but only one will succeed in adding one, holding off other jobs until it has finished.
Jobs may be made dependent on variables on other computers, so the interlock may be made network-wide.
Click here to go to the next stop on the tour.
Click here to go back to the previous stop on the tour.
Click here to return to the start of the tour.
Copyright © Xi Software Ltd 2010 home products contact us