Sub Service_Start(StartingIntent As Intent)
.......... make all I need to do
' calculate next event
Dim n As Long = ..... calculate date and time of next event
DateTime.DateFormat = "dd/MM/yyyy"
DateTime.TimeFormat = "HH:mm:ss"
' write it on a log file so I can to see if it is correct
LogWrite("Next event: " & DateTime.Date(n) & " " & DateTime.Time(n))
LogWrite("---------------------------------------------")
StartServiceAt("", n, True)
End Sub