>>Hi all:
>>
>>I'm trying to run a program (see below) that I BUILDed as a win32 executable. When I run it directly, it creates JOE.MEM and exits gracefully, but when I run with the Windows Task Scheduler, it hangs (the message "the task is currently running" appears in the task scheduler)and the file JOE.MEM is not created. Is there something I need to do to make it run in the background? Putting screen=off in the config.sys does not help.
>>
>>
>>CLOSE ALL
>>CLEAR MEMORY
>>
>>RESTORE FROM elsee ADDITIVE
>>SAVE TO joe
>>IF !FILE('lotexptest.txt')
>> QUIT
>>endif
>>
>Some quick things to check:
>
>1. Does the account you're using to run the scheduled job have sufficient privileges to the folder in question?
>
>2. In the scheduled job, on the Actions tab, have you specified a "Start in" folder? Although it says "optional" in a lot of cases it's actually required. You should make it the same as the EXE folder if you expect your program to find the old mem file and create joe.mem in the same folder as the EXE. You can't use mapped network drives there because those mappings are not created or available in the new context that runs your scheduled job. Instead of a mapped drive you can use a UNC e.g. \\SomeServer\SomeShare.
Bingo! I filled in the 'start in' and it worked. Thanks.