if DateTime.GetHour(DateTime.Now)<23 then
runtime=DateTime.DateParse(DateTime.Date(DateTime.Now) & " 00:00:00")+(DateTime.GetHour(DateTime.Now)+1) * 3600 * 1000
else
runtime=DateTime.DateParse(DateTime.Date(DateTime.Now+DateTime.TicksPerDay) & " 00:00:00")
end if
StartServiceAt("",runtime,True)
I haven't tested this, but I think it should be pretty close to what you want.