Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Widows task scheduler
Message
From
25/12/2013 10:35:31
 
 
To
24/12/2013 23:29:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01590972
Message ID:
01590981
Views:
62
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform