Bryce York
Bryce York

Reputation: 1056

How do I schedule an AWS Lambda cron to run at 11:30pm on the last day of the month?

I'd like my Lambda function to run on the last day of every month at 11:30pm.

I'm using the Serverless Framework so all I need is the right Schedule Expression (docs here & info here)

Any help greatly appreciated.

NB: Unfortunately I can't just do it at the start of the month as there's a dependency on pulling data from a 3rd party tool that only calculates data for 'this month'.

Upvotes: 7

Views: 7364

Answers (1)

Zanon
Zanon

Reputation: 30810

From docs:

  • The L wildcard in the Day-of-month or Day-of-week fields specifies the last day of the month or week.

So, try this cron expression for 11:30 PM at the last day of the month:

cron(30 23 L * ? *)

Upvotes: 23

Related Questions