Hi @Kerri Otis ,
Thank you for posting query in Microsoft Q&A Platform.
As per my understanding you want to validate is it weekday and between 7 to 3PM of EST in pipeline and if it matches then only process activities execution inside IF activity. Please correct me if I am wrong.
The expression you shared will do its part perfectly validating time is between 7 to 3PM EST or not. But its missing logic of validating its weekday(MON to FRI) or not. You should consider weekday validation also in to your expression logic.
dayOfWeek function helps to get weekday number in ADF expressions. The day of the week from the specified timestamp where Sunday is 0, Monday is 1, and so on.
Below expression will do weekday validation as well along with time validation of between 7 to 3PM EST. Kindly use the same in to your IF activity.
@and( contains('12345',string(dayOfWeek(utcnow()))), and( greaterOrEquals(utcnow(),convertTimeZone('07:00:00','Eastern Standard Time','UTC')), lessOrEquals(utcnow(),convertTimeZone('15:00:00','Eastern Standard Time','UTC')) ) )
You can also consider running your pipeline only on weekdays using schedule trigger. Click here to know more.
Hope this helps. Please let us know if any further queries. Thank you.
Please consider hitting
Accept Answer button. Accepted answers helps community as well.