QAD Batches to be automatically run using cronjob in Linux.

sharikaganju

New Member
Hi All,

I have defined a batch in QAD but dont know how to create a cronjob for it using crobtab. Can someone help me in setting up a cron job in linux. I am not aware of the steps or syntax to create it.
 

vinod_home

Member
QAD Solution ID: qad37740
Code:
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.
run mf.p.
output close.
input close.

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:

"Login" "Password"
36.14.13
"NIGHTLY" - - - - - - - - - "NO" 300
.
.
Y


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.
 

sharikaganju

New Member
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.

Thanks in advance.
 

sharikaganju

New Member
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 -

0 5 * * 1-7 /qad/scripts/batch.client
30 22 * * 1-5 /qad/scripts/edibatch.client

And it looks like it is working. Is this a good approach ? or are there any other approaches ?
 
Top