Procedure doesn't terminate when called from task manage

Posted by ezequielmontoya on 14-Jun-2017 11:56

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 */
END.
QUIT.

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?

All Replies

Posted by Matt Gilarde on 14-Jun-2017 12:01

Are you running prowin32.exe or _progres.exe for the scheduled task? If you're using prowin32.exe, try _progres.exe.

Posted by ezequielmontoya on 14-Jun-2017 12:09

Thank you, Matt.

I was using prowin32.  I have just tried your suggestion but the result is the same.

Posted by Brian K. Maher on 14-Jun-2017 12:12

Does adding the -rr startup parameter solve it?
 

Posted by Laura Stern on 14-Jun-2017 12:14

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.

Posted by Laura Stern on 14-Jun-2017 12:16

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.

Posted by ezequielmontoya on 14-Jun-2017 12:21

Thanks Laura, I did that before posting, so I'm sure the loop ends Ok but the programa never quits.

Posted by tbergman on 14-Jun-2017 12:27

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.

Posted by ezequielmontoya on 14-Jun-2017 14:21

Brian: No, but thank you.

Posted by cverbiest on 16-Jun-2017 04:31

missing -b , for batch ?

can you share the command-line with all parameters ?

Posted by ezequielmontoya on 16-Jun-2017 08:33

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.

This thread is closed