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

Compare with Current View Page History

« Previous Version 2 Next »

A process class is an object which can be assigned to a job.
It has two functions

  • to limit the number of job processes which can start in parallel
  • to run the job on a JobScheduler Agent

Limitation of simultaneously running jobs

For example you have two jobs which execute some database transactions.
The job setting allows each job to start for 10 times in parallel.

 <?xml version="1.0" encoding="ISO-8859-1"?>
 <job tasks="10">
    <script ... />
 </job>

You want to make sure that these jobs together can only open 10 database connection at the same time.
For now it is possible that they open 20 connections at the same time.
The solution is the process class object.

Create a process class with Max Processes = 10 ...

... then a file database.process_class.xml is created in the live folder.

<?xml version="1.0" encoding="ISO-8859-1"?>
<process_class  max_processes="10"/>

Assign it to both jobs

<?xml version="1.0" encoding="ISO-8859-1"?>
<job  tasks="10" process_class="database">
    <script  language="shell">
        <![CDATA[
echo ...some database transaction
        ]]>
    </script>
    <run_time />
</job>

If job1 is started for e.g. 8 times and job2 for 2 times then a further start of job1 or job2 goes into the Task Queue
and waits until one of the running tasks (8 x job1, 2 x job2) has finished.

Predefined process classes in the ./config/scheduler.xml

If you open the ./config/scheduler.xml then you see three already defined process classes.

        <process_classes>
            <process_class max_processes="30"/>
            <process_class max_processes="10" name="single"/>
            <process_class max_processes="10" name="multi"/>
        </process_classes>

The process classes single and multi are of historical nature. In the past we had jobs in the JobScheduler setup which use these 'process classes_. For reasons of compatibility, these are still included._
The nameless_process class_is used for all jobs which doesn't have another_process class._
_So, all jobs together which doesn't have another_process class'' can run simultaneously in max. 30 tasks.
You can increase this value if necessary.

Start jobs on a JobScheduler Agent

  • No labels