I’m unclear about how startup scripts function in a server environment.
I currently have a startup script running just fine in my isolated development environment. However I believe some routines should run only when the server is launched, such as a midnight Cron scheduler which does a global reset on all incomplete task records, rolls over tasks scheduled for completion yesterday and reschedules them for today.
I have separate Cron routine which needs to run each time a client launches. This one also runs at midnight and resets the end user’s global date field to today.This is important for machines left on overnight so in the morning the user isn’t caught off guard with pointers to yesterday.
I’m unclear how to make the distinction between startup scripts that need only to be run when the server starts up and when the end user starts up.
In addition, I have filter params which need to run. I’d like confirmation that they need only be run when the server is initiated, not every time each user logs in.
Morley:
I’m unclear about how startup scripts function in a server environment.
There are no startup scripts on the server. Startup scripts are solution bound and executed on the client.
Morley:
I currently have a startup script running just fine in my isolated development environment. However I believe some routines should run only when the server is launched, such as a midnight Cron scheduler which does a global reset on all incomplete task records, rolls over tasks scheduled for completion yesterday and reschedules them for today.
You can use deeplinking to a method for this by executing a URL in your cron. The url can launch a (headless) client and perform the script you indicate through the URL (2.2 and later, see 2.2 release notes for details on deeplinking to a method)
Morley:
I have separate Cron routine which needs to run each time a client launches. This one also runs at midnight and resets the end user’s global date field to today.This is important for machines left on overnight so in the morning the user isn’t caught off guard with pointers to yesterday.
I’m unclear how to make the distinction between startup scripts that need only to be run when the server starts up and when the end user starts up.
In addition, I have filter params which need to run. I’d like confirmation that they need only be run when the server is initiated, not every time each user logs in.
Your assistance most appreciated. Kind regards,
Filters should be set by startup scripts on the client as the filters depend on who logs in and not on the server.
A search of the forum for the term “deeplinking” just turned up this thread, not used elsewhere. However I think you’re saying Servoy can’t initiate a method without a client involved. Therefore put a URL in the Cron which in turn launches a Headless Client which then launches the desired once-a-day method.
Neat! Will give it a shot. Definitely thinking outside the box. This new headless client feature is more powerful than at first glance. Thanks for this.