SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Batch file ends after +/- 1 minute

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Batch file ends after +/- 1 minute
Author Message
Abts Wim



Joined: 01 Sep 2004
Posts: 8

Post Batch file ends after +/- 1 minute Reply with quote

Hi,

I have a job scheduled to run every 15 minutes.
In the JAL script I use the runandwait command to start a batch
file.
This batch file first starts an EDI interface to collect customer order files
then if certain files exist, an ftp connection is made to an as400.
After transferring the files, a program is called to process the transferred files.

It seems now that whenever the program call takes more than one minute, the batch file processing continues
and then ends, leaving the FTP job running on the As400.

I tried using Start /W to start the ftp command but without luck.

I did some testing with a simple batch file that just start an ftp connection and
calls a program on the as400. This program does nothing else than wait for 5 minutes.
When I start the batch file, the ftp program call is done and after approximately one
minute the batch file ends, leaving the ftp job to run until the 5 minutes are over.
Even after adding the START /W before the ftp the processing is the same.

Is there something i'm missing....

Thanks for your help.

Tue Oct 25, 2005 10:03 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Batch file ends after +/- 1 minute Reply with quote

Do you have byany chance 60 seconds timeout set for RunAndWait ?
In other words is it like RunAndWait "mybatch", "", 60, pid

If this is the case set timeout to 0 for infinite waiting.

: Hi,

: I have a job scheduled to run every 15 minutes.
: In the JAL script I use the runandwait command to start a batch
: file.
: This batch file first starts an EDI interface to collect customer order files
: then if certain files exist, an ftp connection is made to an as400.
: After transferring the files, a program is called to process the transferred
: files.

: It seems now that whenever the program call takes more than one minute, the
: batch file processing continues
: and then ends, leaving the FTP job running on the As400.

: I tried using Start /W to start the ftp command but without luck.

: I did some testing with a simple batch file that just start an ftp connection
: and
: calls a program on the as400. This program does nothing else than wait for 5
: minutes.
: When I start the batch file, the ftp program call is done and after
: approximately one
: minute the batch file ends, leaving the ftp job to run until the 5 minutes
: are over.
: Even after adding the START /W before the ftp the processing is the same.

: Is there something i'm missing....

: Thanks for your help.

Tue Oct 25, 2005 10:16 am View user's profile Send private message
Abts Wim



Joined: 01 Sep 2004
Posts: 8

Post Re: Batch file ends after +/- 1 minute Reply with quote

: Do you have byany chance 60 seconds timeout set for RunAndWait ?
: In other words is it like RunAndWait "mybatch", "", 60,
: pid

: If this is the case set timeout to 0 for infinite waiting.

No, If i start the batch file from outside the sheduler, I have the same.
It seems like the processing doesn't wait for the QUOTE RCMD to finish.


Wed Oct 26, 2005 2:35 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: Batch file ends after +/- 1 minute Reply with quote

Try adding "pause" at the end of the file. This will keep the batch file running forever until a key is press or process is killed. In 24x7 set the timeout parameter to 5 minutes or so that it can kill the process after 5 minutes. Maybe this way your FTP thing can continue running while the DOS process is still alive.

Also, consider getting rid of the batch file all together and replacing it with a JAL or VBScript in 24x7. You can run individual commands from there as well as you should be able to do the same FTP thing without using command line FTP utility.

: No, If i start the batch file from outside the sheduler, I have the same.
: It seems like the processing doesn't wait for the QUOTE RCMD to finish.

Wed Oct 26, 2005 8:20 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.