You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_________________________________
< CRON jobs in a cloud native world >
---------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
serverless-python-rds-cron
A serverless python example that periodically updates entries in RDS.
For instance, you might want to mark users as inactive if they have not
verified their email after 30 days.
In other words, this project shows how cron jobs can be scheduled as lambda functions.
$ yarn global add serverless
$ cp .env.yml.example .env.yml
# We can deploy to different stages (environments)
$ serverless deploy -v
# See what we have
$ serverless info
# tail logs for the cronjob function
$ serverless logs -f cleanupCron -t
# invoke the function manually (if a pm pings you or because you can)
$ serverless invoke -f cleanupCron
Fineprint/Don't forget
The tricky/hard part is to make your lambda talk to resources like RDS and
outside world. Follow the tutorial here
Bonus point
Put the database url in secrets manager and get it from there