I have a serverless app running as google cloud function triggered by bucket object finalize. at the end of the function logic I want to call another action (also function) after exactly one minute (or T time). currently couldn't come up with any way to call another action in one minute and had to use sleep in my app.
the problem with sleep is that I have 60 seconds that the cloud function cost money while no real work is being done.
any suggestion on how to execute something from cloud function in T time so I can just exit from function and save money?
keeping in mind I would like to keep it serverless and using GCP.
Use Cloud Tasks with a HTTP target task and schedule_time
:
finalize
event triggers Cloud Function Aschedule_time = now + 60s
and url = URL of Cloud Function B