I wanted to run a function that query a given database and removes ppl from the list after 5 days of insertion. I'd like this function to run each 2 hours to check if there's any item that matches this criteria. Is there a way to run this script without the need to import this function in site's page? I tried calling this function in the site's code and it worked however idk if this will only run when there's someone at the website.
To see this working, head to your live site.
Search
Aug 16, 2018
Is there a way to run a server side function on backend files?`
Is there a way to run a server side function on backend files?`
4 comments
Up. What I'm trying to achieve here is to call a function that cleans up the database under a certain condition. Could anyone help mw with this? I think I'd need this to be running on the site's server. No clue how to achieve this though.
Hi, did you solve it? because I want to do something like this too
I didn't solve it. I think it's not possible to have some schedule tasks in backend.
Ohhh, so do you have an idea for how can I keep in variable some object because I have two pages which display the same data and it take too long on mobile to charge it every time the user change page.