The example belows displays how to setup and run batch processes for different applications in sequence, automatically, using Unix schedule:
Setup for batch process is as follows:
* Set up ONE batch ID "NIGHTLY".
* Queue MRP to ID "NIGHTLY".
* Queue CRP to ID "NIGHTLY".
* In 36.14.3, set the PRIORITY for MRP to 100, CRP to 0
Setting the priority value is important. Higher numbers run first, 0 runs last.
CHUI Scheduler process is as follows:
CHUI Scheduler will be setup to kick off a program that is going to enable MFG/PRO to access and run 36.14.13 Batch Request Processor (mgbatch.p ), for a batch ID of "NIGHTLY" as follows:
* First a client startup will need to be setup (Character Only for NT Clients).
* Setup a -b parameter (batch processing) in the startup and replace the -p mf.p with -p BATCH-PROG.
* Name the client startup BATCH-DAILY
* Setup NT Scheduler to call the startup script of BATCH-DAILY.
The contents of BATCH-PROG (the program being run by BATCH-DAILY) are as follows:
input from BATCH-INPUT.
output to BATCH-OUTPUT.
Note: BATCH-OUTPUT is a file that will be generated as an output file to show what you are running. There is no need to manually create it first.
The contents of BATCH-INPUT are as follows:
"NIGHTLY" - - - - - - - - - "NO" 300
NOTE: Depending on the security option, the first line may be different! The text of the BATCH-INPUT file requires the same rules as a CIM Input file would require. The object of BATCH-INPUT is to 'CIM' through MFG/PRO to run the Batch Processor (mgbatch.p) with the batch ID of NIGHTLY and then exit MFG/PRO.
Thanks a lot for your help.
I had one more problem - I have already put a cronjob using the crontab command (for one of my batch programs) and I followed the above steps to create another cronjob for another batch program. Now I want to crontab the new cron job with the existing cron job. How do I do that ? Cause when I crontab the new cron job it overrites the crontab of the old cron job. In other words only the last cronjob is running.
I have more or less used the same steps as you suggested. What I have done now to have 2 batches run in the same cron. When I used crontab to submit the first job. I edited the cron job in /var/spool/cron as follows -