In my process, I have a spreadsheet that is used for the duration of the calendar month. When my process runs for the first time in a new calendar month, I want a few of the columns to be cleared. This will be in the Init state/If first run part of the framework.
My current solution is to place my activities to update the spreadsheet in an If block with the condition being:
(new datetime(now.Year, now.month, 1).AddDays(-1).Month) <> now.Month
This works for now, as my process will run daily. However, I want to change it for instances where it may no longer be on a daily schedule, or for if the job on the first day of the month doesn’t run for whatever reason.