Hello, we have this issue and hope someone can help us.
This is a simple example from the main block:
FOR EACH [any table] NO-LOCK WHERE [any condition] :
/* ANY STATEMENT */
If I run it from AppBuilder, it ends Ok.
I have made a desktop icon that calls the procedure using same PF and INI. It runs and ends Ok.
We need to execute the procedure several times a day, so we are scheduling it on the Windows Task Manager, but although the loop ends Ok, the procedure keeps "running" and never QUIT.
(OE 11.6.3 32 bits, Windows Server 2012 standard 64 bits, workstation Windows 8.1 64 bits)
What I am missing?
Are you running prowin32.exe or _progres.exe for the scheduled task? If you're using prowin32.exe, try _progres.exe.
Thank you, Matt.
I was using prowin32. I have just tried your suggestion but the result is the same.
Are you sure that the procedure is not ending? Or is it encountering an error or stop condition and restarting over and over? I would put a message at the beginning of the program and after the FOR EACH using OUTPUT TO <file> and see what it is doing.
You should also probably have a CATCH block in there and an ON STOP UNDO, LEAVE phrase, just in case there is an error or stop. But I would do the MESSAGE experiment first to see what it is doing in its current configuration.
Thanks Laura, I did that before posting, so I'm sure the loop ends Ok but the programa never quits.
One more thing to try is to, when setting up the task in the task scheduler, specify a user account. For the test, I'd try the same user that works properly when running interactively.
We never run Progress programs using the task scheduler under the default System account. The primary reason is lack of network access but there are likely other differences as well.
Brian: No, but thank you.
missing -b , for batch ?
can you share the command-line with all parameters ?
Hello, well, I really don't know how, but yesterday morning the scheduled task executed and ended Ok.
An so far, it's still going Ok in every iteration. My choice is to don't touch it.
Thanks for your help, everyone.