Issue
How to schedule a job in AWS to trigger a Lambda at 7:00PM everyday?
My use-case is to send push notifications to specific users. I have users in India and US. After processing the DB to identify those users, I will publish the message using Firebase Admin SDK.
Solution
You can perform this task using Amazon EventBridge and Cron Expressions.
Assume you have a Lambda function named employeemsg.
Choose the employeemsg function.
Under Designer, choose Add trigger.
Set the trigger type to CloudWatch Events/EventBridge.
For Rule, choose Create a new rule.
Fill in the Rule name and Rule description.
For rule type, select Schedule expression.
In the Schedule expression field, enter a cron expression. For example, cron(0 12 ? * MON-FRI *).
Choose Add.
Note: For more information, see Using AWS Lambda with Amazon EventBridge (CloudWatch Events).
Answered By - smac2020 Answer Checked By - Robin (WPSolving Admin)