>Hi All:
>
>I have a program that I have compiled into an EXE. It ends off with QUIT. When I execute it by double clicking the EXE, it does what it is supposed to do and exits gracefully. But when I run it from the task scheduler, it gets stuck somewhere in the program. I do not know where, since I have removed all user interface statements like SET MESSAGE. Also the config.fpw has SCREEN=OFF.
>
>Is there a rule about what statements are forbidden when running from the scheduler?
Yes, no wait states. Mind you, even an error dialog introduces a wait state (the cancel-ignore-help dialog does) so make sure you have a foolproof error handler which will just log the error and quit the app (or ignore the error and let the app continue).
You can also set the scheduler to kill it if it hasn't finished after some set time. Then study the log.