Start a new topic

send delayed emails or sms

I want to send an sms a specific time and tried:

            notification.StartSendingDate = DateTime.UtcNow.AddHours(8);

            _notificationManager.ScheduleSendNotification(notification);


but after reading the code for the new version of notificationmanager i can se that startsendingdate is not in use anymore.

NotificationManager.SearchNotifications


before it was:

     var notifications = repository.Notifications.Where(n => n.IsActive && !n.IsSuccessSend && !n.SentDate.HasValue && (!n.StartSendingDate.HasValue || (n.StartSendingDate.HasValue && n.StartSendingDate.Value < DateTime.UtcNow))).OrderBy(n => n.CreatedBy).Take(criteria.Take);


now it is:

                     query = query.Where(n => n.IsActive && n.SentDate == null && (n.LastFailAttemptDate == null || DbFunctions.AddHours(n.LastFailAttemptDate, criteria.RepeatHoursIntervalForFail) < DateTime.UtcNow));



the journal view in virto cant be used then for scheduling messages and i have to use messy ui hangfire and hangfire with sql. 

1 Comment

Sorry, it is our omission, we will restore this check in next platform release. Thanks for your attention!

Login or Signup to post a comment