I need to create a logic in the code were the bot should run on the 3 business day of the month so can anyone please help me to resolve it.
As through crone expression we cant achive it as it will run to the nearest working day if 3 falls on weekend
Schedule the bot to run on 3rd 4th and 5th of month
In Process in the initialization state use a if condition and first check if the current date Now.ToString("MM/dd/yyyy").Equals(Enumerable.Range(1, DateTime.DaysInMonth(Now.year, Now.Month)).Select(Function(day) New DateTime(now.year, Now.month, day)).Where(Function(date) date.DayOfWeek <> DayOfWeek.Saturday AndAlso date.DayOfWeek <> DayOfWeek.Sunday)(2).ToString("MM/dd/yyyy"))
On true side use a bool and set to true to run bot and on else side set to false and do not run the bot