Moving custom function to join

Adjusting alerting to not create duplicates for different alert schedules