davepamn Active Member Licensed User Longtime User Oct 15, 2015 #1 I have a service that occasionally stops. I need a way to detect the service is stop and restart it.
walterf25 Expert Licensed User Longtime User Oct 15, 2015 #2 davepamn said: I have a service that occasionally stops. I need a way to detect the service is stop and restart it. Click to expand... Have you tried B4X: If IsPaused("ServiceName") then end if Normally to prevent the OS from killing your service you need to make the service run as a StickyService, do a search for this keyword and you'll find all the information you need. Hope this helps! Walter Upvote 0
davepamn said: I have a service that occasionally stops. I need a way to detect the service is stop and restart it. Click to expand... Have you tried B4X: If IsPaused("ServiceName") then end if Normally to prevent the OS from killing your service you need to make the service run as a StickyService, do a search for this keyword and you'll find all the information you need. Hope this helps! Walter
Erel B4X founder Staff member Licensed User Longtime User Oct 18, 2015 #3 Note that it is better to use the service reference: B4X: If IsPaused(ServiceName) Then Upvote 0
davepamn Active Member Licensed User Longtime User Oct 20, 2015 #4 B4X: if ispaused(UpdateServer) then stopservice(UpdateServer) startservice(UpdateServer) end if Upvote 0