Hi all,
is there a way to set a schedule for last day of month? I know I can set the exact day (30,31) but every month is different and I need the schedule on the last day (in February on the 28th, 9th this year)
Thanks
Marco
Set your condition on a schedule run every day to fire if Python returns true. Check to see if tomorrow is in a different Month than today:
- Code: Select all
import datetime
current_date = datetime.datetime.today()
nextday_date = datetime.datetime.today() + datetime.timedelta(days=1)
if (current_date.month != nextday_date.month):
return True
else:
return False
return True
^^^^^^^^^^^
SyntaxError: 'return' outside function
Users browsing this forum: No registered users and 0 guests