sukesh75
1st December 2007, 15:17
Hi Guys,
I have a script that activates or executes (a) baan job from the prompt. Now i want to add another line in there activating a second job right after the first one. How do i set it up so that the second job only executes after the first?

The format i use to execute the job is the following

start <BSE>\bin\bw.exe <bwc file> -- -set BSE_COMPNR=XXX BSH_JOB=<JobName> ttaad5203m000
When i add two lines in the above format for two jobs belonging to two different companies(one being 000), it executes at the same time. I would like the second to wait for the first to finish executing..Possible?

Thanks in advance
sk

Markus Schmitz
1st December 2007, 17:56
try

start /wait <BSE>\bin\bw.exe ...

The wait option tells the cmd to wait for the comment to finish executing. Also check "help start" for more details.

Enjoy

Markus

jaotto
3rd December 2007, 01:30
The BWC files that are you using, are they for two different users linked to the seperate companies?

To run jobs for different companies the users that are associated with the BWC files be in the correct companies as well for the jobs.

It may be worth just using the windows task scheduler to kick off these jobs after you know approximately how long the first one takes.

sukesh75
3rd December 2007, 08:44
Thanks Markus!! The jobs executed one after the other...

jaotto: you must be new to baan, as you will soon find out that you cannot predict the jobs duration in baan once your company starts growing in terms of data size. One day it(job) will get over in an hour, while the other day it could take two hours or even more depending on various factors...As far as the users are concerned, as long as the user is in the correct vrc package as all the other companies, you can set the company at the time of executing the job...

sk