Both, and they're related. Autoscale spins instances up when requests come in and down when idle. A timer inside the process only runs while an instance is alive:
- no traffic → scaled to zero → your interval is dead (the gaps)
- traffic → instance up → interval fires, and while it's doing work the instance counts as busy, so it stays up longer (the bill)
Autoscale is for request/response. For "every 10 minutes", use a Scheduled deployment with a small script that runs checkPrices() once and exits. Keep the web app on Autoscale and remove the setInterval from it.
If the job needs to hold state in memory between runs, then it's a Reserved VM, but that's rarely the case for price checks. Store the results in the DB.