So we just went live this is code and it is sending the anniversary emails to users on their 1st day. I tried the following
but it still sent. I'm not sure if I did the conditions wrong or maybe there is something that needs to be updated with the script.
Script i'm using:
$attributeName = "adm-CustomAttributeDate3"
try
{
$date = $Context.TargetObject.Get($attributeName)
}
catch
{
return
}
$currentDate = [System.Datetime]::UtcNow
$Context.ConditionIsMet = $date.Month -eq $currentDate.Month -and $date.Day -eq $currentDate.Day