I have a function that requests product data from Amazon (
get_product_data()) and would like to run this on my live site either on command or at regular intervals. To save the data into the database I need to use the Pods plugin.
I have thought of two ways to do this.
Run as a wp cron job: The problem is the function takes several minutes to run and the unlucky visitor who loads the page and triggers the cron job will have to wait before seeing the page.
Use a normal cron job/run on the server somehow (?).
Ideally I want the 2nd way but how can I use the Pods plugin if it’s a normal cron job? Is there some way to load WordPress in my server without a web browser (I’m using Siteground by the way)?
I’m relatively new so I appreciate all the help!