Hello community,
I'm in the process of creating my first CRON JOB and I could use some help. My goal is to automatically update the prices of the products in my database using an external API.
In my database, each product has a unique identifier known as a SKUID. This SKUID is a required parameter for the API request. However, the API allows me to send up to 10 SKUIDs at a time per request.
What I'm trying to do is to get my CRON JOB to fetch all the SKUIDs from my database, group them into batches of 10, send the API request, then update the product prices. I want this process to loop until it has updated all the products in my database.
Any advice on how I could achieve this or examples of similar CRON JOB setups would be greatly appreciated. Also, if there are potential pitfalls or better approaches to this problem, I'm all ears.
Thanks in advance for your help :D