I have a simple script, it retrieves data from an API and loads it into BigQuery. I was using Cloud Functions and it was running smoothly, however there came a time that reached the 9-minute run time limit.
What is the best way to do this in GCP, taking the time the script needs? I was thinking of creating another Cloud Function that daily starts a preemtible VM, the VM executes the script and in the end turns itself off. To keep the price low, the VM would always shut down at the end of the data load. It would start the next day at the selected time.
I don't know where to start to do this, but I was wondering if that would be the best way.