0

Is it possible to use a Timer trigger to run an Azure function 2 days before end of month?

I tried 0 0 0 L-2 * *, but it is not allowed.

Invalid Cron Expression.

When I use https://crontab.cronhub.io/ with my cron expression, I get my expected result At 12:00 AM, 2 days before the last day of the month.

Rookian
  • 19,841
  • 28
  • 110
  • 180
  • you could use a cron expression, need to figure out how to create a CRON that do the job tho – Thomas Jul 26 '22 at 10:02

1 Answers1

0

Unfortunately, as per your requirement as there is no CORN expression that can help in your case.

You need to create a custom solution by creating a timer trigger function that would be running every day. You need to write your custom logic to validate whether current date is equal to last or second last day of the month. If it is true then inside the condition you can write your business logic for further processing.

Refer to similar case (where customer want to avoid the execution of workflow on first and last day of the month) to implement your custom logic.

VenkateshDodda
  • 4,723
  • 1
  • 3
  • 12