1
Good afternoon,
My question is the following, I have locks in my application in PHP with Codeingniter, and I need to release users a few times. So, I select my user for 2(Supervisor) but I want that the next day, at 8 am it returns to 1(user).
I tried to make m JS with setTimeout, but for the application to work I would have it on the page... I wanted to do it dynamically, I read about Mysql event, but I was not a bit confused with its functioning.
If anyone can help me, I’d be very grateful!
because it does not create a script in runs with
cronjob
?– balexandre
How would that be ?
– Diêgo Correia de Andrade
"I tried to do m JS with setTimeout" you want to update something on the server using a client event in the browser? that doesn’t make sense, apart from whether the browser should continue open. Why don’t you use
CREATE EVENT
and creates an event in the database to do this?– Ricardo Pontual
@Ricardopunctual other doubt, just doing the CREAT EVENT and putting as EVERY 8 DAY_HOUR, it will run every day at this same time? Or I need to do something else?
– Diêgo Correia de Andrade
after creating the event the "Mysql Event Scheduler" is responsible for executing according to the Schedule that was scheduled, so being working will always trigger the event at that time every day.
– Ricardo Pontual
I guess my plan at Hostgator doesn’t do that...
– Diêgo Correia de Andrade
you must consult them to confirm, but if you are running the bank service you must have the event service, you need to see if it is shared and how to configure
– Ricardo Pontual
Managed using cron scheduling service
– Diêgo Correia de Andrade