Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any free software that will detect the status of internet and shutdown the system when the internet disconnects?

Or (more generally) can something run a task when the internet disconnects, and I can route it to shutdown the machine?

I am downloading things overnight. But my problem is that sometimes the internet connection will be disconnected in the middle of the night, so there is no point in keeping the system running the rest of the night.

So I need to avoid this problem by detecting the net connectivity.

share|improve this question

migrated from stackoverflow.com Dec 22 '09 at 18:29

This question came from our site for professional and enthusiast programmers.

add comment

5 Answers

You can make an executable of your own, where you can ping some popular websites and see if you are receiving response. If not you can shutdown the system. I'm sure there are free software that already do that. Will update if I find any.

share|improve this answer
    
This could probably be done with AutoHotkey and the Windows ping command. –  Nathaniel Jan 26 '10 at 6:19
add comment

A simple solution would write an AutoIt program that attempts to ping your internet service provider's DNS resolver. This is the only true way to detect if you're "connected" to the internet or not, since it's not always reliable to ping third party websites.

I would set it up to ping every minute, and if no response is received for 5 minutes, shut the computer down (or set it to go to sleep mode). Fortunately, AutoIt has a built-in Ping() and Sleep() functions.

The simple script would look like the following:

Local $i = 0
While $i < 5                             ; Looping until we hit 5 attempts...
    If Ping("12.34.56.78", 10000) == 0 Then  ; If we couldn't ping...
        $i = $i + 1                          ; Increment the counter.
    Else                                     ; Else, if we could,
        $i = 0                               ; Reset the counter.
    EndIf
    Sleep(60000)                             ; Finally, loop every minute.
WEnd

; If the script gets here, we missed 5 pings - take action.
Shutdown(32)    ; See the Shutdown() documentation, this makes the PC sleep.
                ; http://autoitscript.com/autoit3/docs/functions/Shutdown.htm

Before you run the computer overnight, you could then just execute the above script. To continue using your computer normally, simply close the script.

Disclaimer: I have not tested this code (I wrote it quickly in Notepad++), but it looks viable.

share|improve this answer
add comment

"Timed Shutdown 0.51b" can help you.
It has a built-in shutdown feature whenever you are disconnected from Internet, and it also includes timed or scheduled shutdown features.

Try this link to download: http://timed-shutdown.en.softonic.com/download

share|improve this answer
add comment
  • DownOff is a mini free application it will auto shutdown your PC , when your internet connection disconnects or download rate drops below a mentioned rate .

enter image description here enter image description here

  • DownOff also lets you choose between Hibernate, Monitor, Power off, Reboot, Shut Down and Standby. The application maintains logs to let you analyze the previous system shutdown information.

Go here for more information

enter image description here

share|improve this answer
add comment

There is a download manager called FlashGet that has this feature built in.

From the menu documentation:

Shut Down When Done: When this is set, FlashGet will disconnect from internet and shutdown your computer on exit (usefull if you leave your PC turned on only to download files).

share|improve this answer
    
The poster asked for when the internet drops not when his download finishes. –  MrStatic Mar 17 '10 at 2:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.