1

I know that for GCP cloud scheduler the max timeout is around 20 minutes for a HTTP request source.

Is it somehow possible, on GCP (perhaps using a different service) for me to invoke an HTTP endpoint, that takes around 65 minutes to respond, every ~6 hours?

ErnestoC
  • 2,660
  • 1
  • 6
  • 19
Peter Toth
  • 678
  • 6
  • 23
  • Not an answer, but in the real world, you do not want to design endpoints that take more than a few seconds/minutes to respond. Connections fail, timeout, reset, etc. Instead, redesign your endpoint to return a response with some form of identifier so that the command can continue to run asynchronously. – John Hanley Jan 30 '22 at 21:05

2 Answers2

2

Agreeing with the comments, it would be better if you restructure your application so that it doesn’t have to rely on such a long timeout period. This is due to the drawbacks that John Hanley commented on. As for your actual question, you could combine multiple services. For example, Cloud Run has a maximum timeout of 60 minutes, which you can set up when you deploy your service.

Now, in order to run this service every 6 hours, you can make use of Cloud Workflows. Workflows is an automation tool which can be used to combine multiple GCP services in a single automated process. It can execute Cloud Run services, and you can in turn schedule this Cloud Workflow to run every 6 hours with Cloud Scheduler.

ErnestoC
  • 2,660
  • 1
  • 6
  • 19
0

In the end what I ended up doing is creating a micro VM instance on gcp and followed this guide to manually set up a cronjob in ubuntu: https://www.geeksforgeeks.org/how-to-setup-cron-jobs-in-ubuntu/

Peter Toth
  • 678
  • 6
  • 23