I have a global date field which holds the user's current date choice. I want to reset the value to today shortly after midnight daily for all users.
Is this possible?
One of us is misunderstanding the other.jcompagner wrote:Start a scheduler at the start of youre solution that triggers around midnight.
Start a Scheduler routine when the user logs in that triggers shortly after midnight to reset the date variable? Yes, I can see how that might work. Thanks for the nudge.ROCLASI wrote:The Servoy scheduler is in the scope of the client. Not the server. (I wish)
If you want to do something 'server-side' you need to have a client open on the server.
But because global variables are session specific you can't control them from the server. So you need to control them from within each client (and thus that session).
This is where the Scheduler plugin comes in.
Morley wrote:But is this the right setup for a server deployed solution? The way I've got it structured now the daily Cron will get set up each and every time a new user logs into the solution. Does this matter? Should I put the daily Cron into a separate routine that gets triggered just once when the solution is deployed on the server?
A "headless" client? Not familiar terminology.ROCLASI wrote:That depends on what your cronjob does.
You should ask yourself if you want that cronjob to be fired more then once. I.e. when you have 10 clients open it will fire 10 times.
If you want it only happening once you might wanna use a (headless?) client on the server that performs this task.
Morley wrote:A "headless" client? Not familiar terminology.
Return to Programming with Servoy
Users browsing this forum: No registered users and 2 guests