Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scheduling a VFP EXE in Windows Server?
Message
From
23/08/2019 06:47:42
 
General information
Forum:
Windows
Category:
Computing in general
Miscellaneous
Thread ID:
01670262
Message ID:
01670276
Views:
38
>Hi,
>
>A customer asked me if it is possible to run a certain procedure - actually procedure with printing many pages - unattended, automatically once a week. The only way I can think of doing it is creating a VFP application (EXE) and scheduling to run it automatically on a predetermined time. But I have never scheduled a program to run from Windows schedule. Sp. this would have to be scheduled in the Windows Server.
>Are there gotchas to watch for when doing this?

We do this on a regular basis. Some of our apps send out advice statements via email, and these are run in batch processing daily and sent out in the morning hours.

Windows Task Scheduler is used in some cases, but it's not always completely reliable. We wrote our own service to handle the task scheduling, but you lose some abilities there as in modern Windows tasks launched from services do not inherit any ability to interact with the UI directly. I believe there's a flag to allow this now, but I haven't experimented with it.

Regardless, Windows Task Scheduler works often, and it can handle everything you need. You just need to leave the client machine running, or set it up to run on the server. It can launch and process anything you need through an automated task if it's done unattended.

The biggest issues we've seen are using the wrong user / login information, so various drives aren't mapped, or permissions aren't setup correctly. Another is making sure your automated app doesn't have any UI features like a MESSAGEBOX() or something, which will hang the process. You typically want automated processes to write error logs rather than provide UI, and then let a second program examine the error log when the user is there. In the alternative, designate email addresses for automated process updates and send the results of the operation so those people responsible for the activity are aware of the conclusion of the process when they check their email. They can take corrective action, or have confidence in the process running smoothly.

Sometimes Windows updates can cause the Task Scheduler to stop scheduling again, and it must be gone into manually and reset / changed so it saves back out properly.

The Task Scheduler seems to be a very fragile part of Windows, one that seems to break randomly and for no apparent reason whatsoever. In other cases, it is stable and reliable. It's been our must frustrating component of any automated process. The second most frustrating is having the wrong user and therefore incorrect network access to necessary resources.

Hope this helps.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform