Sub GetNextTime(IntervalMinutes As Int) As Long
Dim t, interval As Long
interval = IntervalMinutes * DateTime.TicksPerMinute
t = DateTime.Now
t = t + interval
t = t - (t Mod interval)
Return t
End Sub
Sub SetAuto
StartServiceAt(autoalarm, GetNextTime(xxxx), True) ' Set alarm on next xxxx minute
noti.Initialize ' Set notification
noti.Light = False
noti.Vibrate = False
noti.OnGoingEvent = True
noti.Sound = False
noti.Icon = "icon"
noti.SetInfo("Auto Alarm", "On next" & xxxx & " minutes", "")
noti.Notify(1)
End Sub