I have a Spring Boot application that I deployed in Google Cloud Platform. It runs without any errors and I am able to invoke the Rest endpoints in the project by using Web Preview feature of GCP.
However, what I want to do is to call one of these endpoints once a day using something like cronjob. What I tried is to create a Cloud Scheduler in GCP but I wasn't able to find which url to send the request. I am lost in GCP documents trying many different approaches like dockerizing my project, creating cloud functions etc. which didn't help.
What is the easiest way to automatically and regularly invoke an endpoint in the project that I deployed in GCP?
Did you actually deploy your applications to GCP (to a Compute Engine VM, a Kubernetes Engine cluster, as an App Engine application, etc.)? Or are you just running you application in Cloud Shell?
If it is the latter, your application is not actually deployed for production use. Rather, Cloud Shell is more akin to a development workstation that is provisioned for you on demand (and for free) in GCP. To access your application on that machine you must use the web preview feature that connects your browser to a port on that machine (after authenticating you). When you disconnect from Cloud Shell, the machine goes away after a period of inactivity (although the home directory is persisted).