veerle
24th April 2008, 11:47
Can somebody help me how i can run a session from an external event.
Should it be possible to start a baan session after a file is put in a specific folder? We have an extern program that generates a file, if the file is created and put in a specific folder, a baan sessions should be started (without extra user interaction). Is this possible without a lot of workload?
Thanks in advance.
Veerle
Han Brinkman
24th April 2008, 12:23
According your profile you use baan on windows so:
1. create a scheduled task that runs a batch file;
2. within that batchfile check if the file exists;
3. if the file exists start a baan job
Regards,
Han
veerle
24th April 2008, 12:34
Thanks for your anwer, but how should I create a scheduled task that runs a batch file? We'll execute the baan session realtime, so directly after the file is created? Is it possible to react on events, without scheduling the job each x minutes?
Han Brinkman
24th April 2008, 18:11
That's an disadvantagde of my solution, you have some wait time.
If you are able to modify the external program you can perhaps have the possibility to start the scheduled task after the file has been created and close. Would that solve your problem?
Regards,
Han
NPRao
24th April 2008, 19:54
Veerle,
Refer to the threads -
Run Baan function from script (http://www.baanboard.com/baanboard/showthread.php?t=5794&highlight=ba6.2)
Running a Baan script from UNIX command line; ba6.1 runtime options (http://www.baanboard.com/baanboard/showthread.php?t=6850&highlight=ba6.2)
You should add code to your external program to activate a Baan session after that file is copied into that folder then you do not need a job scheduler and avoid delays.
Han Brinkman
25th April 2008, 12:40
I agree that it's not needed to use a scheduled task to start a session.
On the other hand that gives you the possibility to have a administrator change the program that needs to be started without having to involve a programmer. (unless the session startup is defined in a parameter) With a job it's also a bit easier to run more sessions after the file has been closed.
Scheduled tasks can be defined as run once and started from the commandline directly without a delay.
Lot's of ways to implement it, pick the one that suits you.