Website database not updating automatically : <p>I have a script which i made myself, it's doing the following:
-Crawl database to see if current date equals date of a value in the database
if true: Add +7 days to the date and then get the Ascending value of a date. 
It's supposed to update each sunday</p>

<p>but the problem is: The crawling and updating only happends if someone visits the website specifically on the date where it's supposed to be updated.</p>

<p>So for instance if there is a date in the database which equals 2019/1/11 and the current date is 2019/1/11 , it's updating it to that date + 7 days. </p>

<p>BUT only updates when visiting the site on 2019/1/11. If visiting the site on 2019/1/12 the updating does not work anymore</p>

<p>How can i make it update itself / running the php code without someone having to visit it for it to update?</p>
