Raisen
Raisen

Reputation: 4495

Best approach to develop a cronjob based application on both server and serverless envrionments (AWS)?

What is a recommended approach to implement an express (node.js) application that creates numerous cronjobs based on user data? This express application will be eventually served by API Gateway and Lambda.

My concern is how to be able to work on this application on a non-serverless environment (such as a developer environment) and also on an AWS serverless stack?

My initial thought was to create a cronjob "wrapper" that detects what environment is on and invoke the proper commands. For example, if on a development environment, use node-cron, otherwise use AWS EventBridge Scheduler.

What are your thoughts?

Upvotes: 1

Views: 55

Answers (0)

Related Questions