I need to copy data from another server and store it in MySQL. The data must be copied every 4 hours. The problem is that I cannot use PHP file_get_contents
for GET query because it is executed when a user enters the page, but I need to execute it automatically every 4 hours. If I am not mistaken, I need a special hosting service that can run, for example, a python script that copies data and stores it in MySQL with the timer interval of 4 hours. (So, when a user enters the page it will show data directly from MySQL).
What are your recommendations?
Asked
Active
Viewed 46 times
0
-
A CRON should work. – Script47 Jun 11 '18 at 15:55
-
3Possible duplicate of [PHP: running scheduled jobs (cron jobs)](https://stackoverflow.com/questions/120228/php-running-scheduled-jobs-cron-jobs) – Nigel Ren Jun 11 '18 at 16:04