As an on-call engineer it is convenient to get reminders before your on-call duty starts. You can configure this easily with Enterprise Alert.
You can configure on-call reminders directly in the app under Settings -> On-Call Reminders. This will send a reminder every time a user’s duty starts.
If you do not use the app you can also configure on-call reminders via SMS or email with the following SQL script on the database:
The following stored procedure is available for setting on-call reminders via SMS or email. The stored procedure already exists.
CREATE PROCEDURE dbo.sp_OnCallCreateDutyReminder
(
@ProfileID int,
@Action int, — 0 = Nothing, 1 = Send Reminder, 2 = Send modified command
@ReminderTimeBeforeDuty int,
@MediaType nvarchar(255),
@Device nvarchar(255),
@MaxHierarchy int, — 0 = Primary only, 1 = first backup,… -1 = all
@Options int — 1 = include standins, 2 = include holidays, 4 = include exception days
)
You can call the above remote procedure in the following way.
EXEC dbo.sp_OnCallCreateDutyReminder <User ID>, 1, 300 /* 5 min before duty start*/, <‘E-mail’ or ‘SMS’>, ”, -1, 7
First you might want to get the User ID from a given username first using the following query:
SELECT ID FROM MMPROFILES WHERE PROFNAME =’Administrator’;
With this user ID you can set the on-call reminders as follows.
Set reminder via email:
EXEC dbo.sp_OnCallCreateDutyReminder 1, 1, 300 /*5min*/, ‘E-mail’, ”, -1, 7
Set reminder via SMS:
EXEC dbo.sp_OnCallCreateDutyReminder 1, 1, 300 /*5min*/, ‘E-mail’, ”, -1, 7
The user will then get according reminders before his or her duty starts. The on-call reminder information is then available in the tables OnCallDutyReminders and OnCallPlanUserDutyReminders.