Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Script to run multiple batch jobs in sequence

    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Description:
    Is it possible to add an Aleph service to the batch queue from the command line or script, instead of running it directly? I tried to find this in the doc portal, but wasn't able to locate anything.

    Resolution:
    When you submit a job from the command line, such as:

    csh -f $aleph_proc/p_file_03 ABC50,z30,go > & ... &

    to export the item file, since it has ABC50 as the library, it appears in the abc50 util c/1 batch queue, but, if another job is running, this command-line-submitted job you have submitted will *not* be prevented from running.

    It is only the GUI-submitted services or job_list jobs with "Y" in job_list column 3 {"queue (y/n)"} which are queued in this fashion.

    You are also not able to specify a particular start time for the job. Jobs submitted from the command line are always released to run immediately.

    If you want Job B to run only after Job A has finished but want to submit them at the same time from the command line, you can create a file like this:

    > cd $alephe_root
    > vi multijob

    csh -f $aleph_proc/p_job_a USM50,xxx,yyy > & usm50_p_job_a.log

    csh -f $aleph_proc/p_job_b USM50,xxx,yyy > & usm50_p_job_b.log

    csh -f $aleph_proc/p_job_c USM50,xxx,yyy > & usm50_p_job_c.log &

    You will note that only the **last** csh line in the file ends with "&".

    You can then use the following command to execute this "super-script":

    csh -f $alephe_root/multijob > & multijob.log &

    KB 16384-19810 describes the creation of such a script for multiple p_cir_25's in a multi-ADM environment.


    • Article last edited: 10/8/2013