WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Bat file is not getting enough time (Read 4240 times)
Michalke
YaBB Newbies
*
Offline



Posts: 6
Bat file is not getting enough time
Jun 9th, 2011 at 5:18am
 
Hi

I have a bat file which runs a birt (eclipse) report. It takes about 15 seconds to complete when startet manually at the bat file. As a result I get a complete report. When I let the bat file start through watchdirectory ("run any program / bat file") i get only half the report. Also when I let the bat file start through the windows scheduler I get a complete report.

What can I do to get this bat file running correctly with watchdirectory Pro?

Thanks in advance.

P.S.
Otherwise WatchDirectory is doing a great and absolutely reliable job with the other tasks.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Bat file is not getting enough time
Reply #1 - Jun 9th, 2011 at 10:36am
 
Hi,

If you use "Start any program" ( http://www.watchdirectory.net/wdhelp/plugins/wdopAutoLaunch.html ) you can disable "wait for the program to exit" or set the wait-time higher.

For "run any bat file" ( http://www.watchdirectory.net/wdhelp/plugins/wdopAutoRunBat.html ), if you select "Don't wait for bat files to complete" you can also select the option "don't give up waiting". If you do not select this, I believe it stops after 20 seconds.

Alternatively, for bat files, you can let your bat script start another, independent, process. Something like this:
Code:
start "title of window" "C:\Bin\OriginalScript.bat"
 


The bat file above will exit after it starts your script, but your script will continue to run.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Michalke
YaBB Newbies
*
Offline



Posts: 6
Re: Bat file is not getting enough time
Reply #2 - Jun 9th, 2011 at 1:52pm
 
Hi Gert

Thanks for your reply. Strangely enough I get the following error in my report:

+ An exception occurred during processing. Please see the following message for details:
Cannot open the connection for the driver: org.eclipse.datatools.connectivity.oda.flatfile.
Cannot open flat file database under directory: \\server\users\Getreide-EK-VK-KO\Test

In this directory ar my flatfile databases located for my Birt report which is triggered through a Kontrakte.bat file when any of these flatfiles change. On the other hand when I trigger Kontrakte.bat manually or through the Windows task scheduler I get a complete report, that is to say the flatfiles are accessible and everything is working correctly. Something is going wrong while Watchdirectory Pro is doing it.

Have you got any idea on that?
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Bat file is not getting enough time
Reply #3 - Jun 9th, 2011 at 1:56pm
 
Michalke wrote on Jun 9th, 2011 at 1:52pm:
Have you got any idea on that?


Are you running the WatchDirectory task as a Windows Service? Please read http://blog-en.gdpsoftware.com/2010/04/watchdirectory-tasks-as-windows-service.h...
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Dirk
YaBB Administrator
*****
Offline



Posts: 658
South Germany
Re: Bat file is not getting enough time
Reply #4 - Jun 9th, 2011 at 2:05pm
 
and note that not every program (or bat file that is controling a program) can run as a windows service. Try running the task "normal" to see if it runs fine without a service.
Back to top
 

Viele Grüße / Best regards
Dirk - GdP Software

dirk [at] gdpsoftware [dot] com
http://blog-de.gdpsoftware.com
Webseite: http://www.gdpsoftware.com
WWW WWW  
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Bat file is not getting enough time
Reply #5 - Jun 9th, 2011 at 2:15pm
 
Dirk wrote on Jun 9th, 2011 at 2:05pm:
and note that not every program (or bat file that is controling a program) can run as a windows service. Try running the task "normal" to see if it runs fine without a service.


Correct. However, 99% of programs can run as a service... It may be difficult to find out how to properly setup the program (environment variables, privileges etcetera). Most issues can be solved by using a proper user/pwd for the service.

Obviously, a program like notepad that waits for user input are almost impossible to run as a service....
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Michalke
YaBB Newbies
*
Offline



Posts: 6
Re: Bat file is not getting enough time
Reply #6 - Jun 9th, 2011 at 2:21pm
 
Thank you both for your engagement!

Obviously it is not working my way. I then created a task to copy the flatfiles to another directory and change my BIRT report to access the files from there. Then it works.

Anyway, it works finally.

Thank you very much for your thoughts.

And still: Watchdirectory is a great programme and timesaver!!!
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1