Serverles web app with automatically created, scheduled one time jobs

Viewed 81

I'm trying to figure out if it's feasible to create a serverless web app in which an API function creates a job that is scheduled to run once at a specific time and date.

I've looked at the three main providers, AWS, Google Cloud and Microsoft Azure. All three provide everything needed for a serverless web app in general, but I'm not sure I understand if any of them support what I described above.

AWS has CloudWatch, which has an API. However, there is nothing about Events in the API doc, it looks like Events can only be created by hand in the console or via Terraform.

Google Cloud has the Scheduler. However, there is no mention of an API in the docs. It does support Terraform too, though.

Microsoft has the Azure Scheduler, and that one seems to support creating jobs via an API.

Doesn't Terraform require an API, so am I missing anything?

I'm completely new to serverless web apps. Is this even the correct approach to do this?

Edit:

I just realized that it's possible to create Amazon CloudWatch events via an API, however, it's called EventBridge... That makes me think I might have missed something in Google Cloud as well. However, I'm still wondering if this is the right approach?

To provide a little more detail on what I want to do:

  1. A user creates an event in the web frontend.

  2. My API function that the frontend calls creates some cloud version of a cronjob that is to be run once at a specific time and date

  3. The job triggers another function that does something with a third party API at the time specified by the user

1 Answers

On Google Cloud, you can deploy your app on serverless services (Cloud Run, Cloud Function or App Engine). Then, you can set up a Cloud Scheduler. Cloud Scheduler can call an HTTP URL and then to trigger you serverless service.

About the API accessibility of Google Cloud services, "All is API". So you can do all what you can on the console or with the GCLOUD cli, with API calls.

Related