FoxPro Programming
Issue running from task scheduler when user not logged in
Gravatar is a globally recognized avatar based on your email address. Issue running from task scheduler when user not logged in
  Randy Godfrey
  All
  Oct 9, 2020 @ 01:32pm

We have an .exe with no UI that is added to the task scheduler from a VFP form. The task is added successfully and execution is started at the correct time.
If the task is added and set to run when the user is logged in it runs successfully. However, if added to run when the user is not logged in the task starts but hangs on the line:

SET LIBRARY TO .\vfpencryption71.fll additive

At this point it has already gone through all the SET CLASSLIB and SET PROCEDURE commands. The program hangs both when it is set to run with the users account or the SYSTEM account.

Any idea as to why this line hangs when set to run when logged out - even if the user is logged in?

Gravatar is a globally recognized avatar based on your email address. re: Issue running from task scheduler when user not logged in
  Rick Strahl
  Randy Godfrey
  Oct 9, 2020 @ 01:43pm

Make sure you set the startup path in the Task configuration. Otherwise the EXE will run out of the system folder.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Issue running from task scheduler when user not logged in
  Randy Godfrey
  Randy Godfrey
  Oct 9, 2020 @ 02:24pm

Argggg. Missed setting the workingdirectory when I defined the action in the powershell method. Strange that it was set in the object method and did not work - but does now. Must be Friday.

Thank you.

© 1996-2024