How can I trigger something to run on the last day of the month using the trigger on schedule node? Ie even if that particular month only has 28 days or 31 days etc? I guess one way would be to trigger it to run everyday and then have a filter that checks with javascript or something if today is the last day of the current month. But wondering if there is a cleaner way in the scheduler itself?
Hey Dan, CRON itself isn’t really designed to target specific dynamic dates like “the last day of each month.”
It mainly works with fixed intervals and has some logical limitations, so it can’t directly express “run on the final day, regardless of whether the month has 28, 30 or 31 days.”
Because of that, the logical approach is:
Run the scheduler every day …and then use either:
a JavaScript filter, or
a condition on the first route using Latenode operators
to stop execution unless today is the last day of the current month.
For example, using a Latenode expression:
{{
formatDate( addDays( now; 1 ); "MM" ) != formatDate( now; "MM" )
}}
addDays(now; 1) checks tomorrow
If tomorrow’s month is different from today’s → today is the last day
The expression returns true only on the final day of the month
You can place this expression inside a Filter or the first router condition to allow execution only on the correct date.
Or Simply ask an AI assistant, and it will generate the exact JavaScript filter you need, returning true or false based on your specific conditions.