Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Service program: UI form or not?
Message
From
09/05/2021 13:03:48
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01680248
Message ID:
01680253
Views:
37
>>>Hello,
>>>
>>>I am working on creating a program which will be used as a service.
>>>
>>>In a nutshell, the program will consist of one form with a timer on it. The timer will run 24/7 and call a procedure every # minutes. The procedure will connect to SQL Server and based on some table/rows values will send email(s).
>>>
>>>Mainly the form will have a textbox which will show the end user the timer interval. My goad is to run the form minimized so that it won't be seen on the server. And the user will be able to change the timer interval by changing the text box value.
>>>
>>>A question:
>>>
>>>Can a program used as a service have a Form? Would the use have to stop the service to bring up the form to make a change?
>>>
>>>TIA
>>
>>I would not do a service as easy as it seems to be with whatever third party tool you might use.
>>
>>I would write a bullet proof with serious error logging FoxPro EXE that has no UI and doesn't use a Timer and have it run as a Windows scheduled task every x minutes.
>>
>>The Windows Scheduler logs the start of the task and is easier, IMO, to maintain and configure. I've used Windows Scheduler a lot and it works fine. You just have to write a very smart program that cannot fail without writing out an error log.
>>
>>Whether a Service can run a VFP EXE with a Form is something that I doubt can happen, but I don't know for sure.
>>
>>And in the past I've had trouble with FoxPro Timers where they don't fire.
>
>Thank you for your message
>
>Isn't the Windows Scheduler need someone to be logged in the VM/server for it to run?

Whether you do a Service or a Windows Scheduler you're going to need to login some user in. And that user needs to have the rights to the folders your app needs. You might create a special login for this purpose as opposed to using your own login.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform