Neat Trick: Holiday Notifications

I got an interesting question from a support customer today. Due to the Fourth of July holiday this weekend, they wanted to send all notifications to the On Call destination path, but starting on Tuesday morning at midnight they wanted them to go back to normal.

I thought of an easy way to do this. Copy the notifications.xml file to notifications.normal.xml and to notifications.oncall.xml. Edit the latter file and change all of the <destinationPath> tags to point to the On Call path.

Since changes to the notifications.xml file do not require a restart, all they have to do is to set up a cron to copy the “oncall” version of the file to notifications.xml when the holiday starts, and another cron entry to copy the “normal” version back when the holiday ends.

Easy peasy.