I have a wordpress web application and inside the root directory I have a file: data.php which contains code to fetch data from a JSON feed and store it in the wordpress database.
However since I am deploying this to a server, I need to tell the script to run after I deploy the my local wordpress site to the server and then after that it should only run/fetch data after every 2 hours.
How would I set this?