A scheduling service which supports and orchestrates running tasks/jobs immediately, in the future or on a recurring basis.
services
- AWS Lambda functions written in Node.js (TypeScript)stacks
- Serverless stack definition written in TypeScriptweb
- React application with TypeScript
Serverless stack on AWS
- SST - a framework that makes it easy to build and deploy full-stack serverless applications.
- Amazon API Gateway - a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.
- AWS Lambda - a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers.
- Amazon DynamoDB - a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale.
- Amazon EventBridge - a serverless event bus that lets you receive, filter, transform, route, and deliver events.
- Amazon SQS - a service that lets you send, store, and receive messages between software components at any volume, without losing messages or requiring other services to be available.
- React - a JavaScript library for building user interfaces.
- Mantine - a fully featured React components library.
- Redux Toolkit - the official, opinionated, batteries-included toolset for efficient Redux development.
- Tabler Icons - an icon library with over 2900 pixel-perfect icons for web design.
- dayjs - 2KB immutable date time library alternative to Moment.js with the same modern API.
Running jobs on their scheduled time:
- Immediate
- Future time
- Recurring (weekly/daily)
- API is invoked to create an immediate job
- API Gateway passes the request to Lambda
- Lambda executes the job (sending a message to SQS)
- API is invoked to create a future job
- API Gateway passes the request to Lambda
- Lambda stores the job to DynamoDB
- EventBridge invokes Lambda in every minute
- Lambda checks DynamoDB for scheduled jobs
- Lambda executes any scheduled jobs (sending messages to SQS)
GET /schedules
e.g. response:
[
{
"payload": "Nice one",
"jobId": "1d24b4d0-5ac7-11ed-8cbc-1fbf296d5db5",
"recurring": "daily",
"minute": 27791516
}
]
GET /schedules/{jobId}
e.g. response:
{
"payload": "Nice one",
"jobId": "1d24b4d0-5ac7-11ed-8cbc-1fbf296d5db5",
"recurring": "daily",
"minute": 27791516
}
POST /schedules
e.g. request body:
{
"payload": "cool stuff",
"minute": 27789898,
"recurring": "none"
}
e.g. response:
{
"jobId": "0e8bcf60-5b23-11ed-83c8-bf0a6fed592f",
"payload": "cool stuff",
"minute": 27789898,
"recurring": "none"
}
PUT /schedules/{jobId}
e.g. request body:
{
"payload": "drink more water",
"minute": 27789493,
"recurring": "none"
}
e.g. response:
{
"payload": "drink more water",
"jobId": "6dc533e0-5a74-11ed-b427-6dc61c712f9d",
"recurring": "none",
"minute": 27789493
}
DELETE /schedules/{jobId}
e.g. response:
Status 200
The React application is deployed on AWS Amplify.