Sep-22-2018, 12:31 PM
(Sep-21-2018, 07:58 PM)nilamo Wrote: I vote against time.sleep for 12(!!) hours. For one thing, if you logout or the machine restarts, then your script never runs again. I would set it up as two completely independent things. There's a web app, that takes some data and displays it. Then there's a second script that updates that data. The web app doesn't need to care about how often the data is updated, it just pushes it to the browser. And the second script also shouldn't care about how often it should run, it should just fetch the page, and update the data, every time it's run. And then run the update script once every 12 hours using cron. https://en.wikipedia.org/wiki/CronThank you for your answer. So, if I deploy my web app, the server will run my main app script right? And if I want to send a request to another web site and monitor it through my app, does the server able to execute the other independent script which uses cron?