How to automatically turn on and turn off your computer for Night Unlimited Plans

[This article has special focus on the Huawei SmartAX MT882 DSL modem]
[Update: Re-written with a better hack on November 14th]
How about having your computer start up by itself; Download stuff at the odd times in the night that your telco feels you can enjoy unlimited plans; and then sleep/shutdown by itself; while you sleep soundly all the while :)
That's exactly what we'll learn to do.

Software you'll be using (200KB)
Wake up on stand by http://www.dennisbabkin.com/php/download.php?what=WOSB


I just love this simple software to turn on and turn off the PC. It does it's job as advertised and is quite simple to use. The screenshot below shows the program with preferences set to start utorrent (you can have anything here) at 2:10AM and then turn off the computer at 7:50 AM.

WOSB

We'll also make use of Scheduled tasks in windowsj; with the scheduled tasks you can have even more programs turning on automatically. You can find a neat write up on using Scheduled tasks here
http://kougon.blogspot.com/2008/08/how-to-make-best-use-of-your-limited.html

If your service provider times your connection properly then this should be it. You're done and enjoy your sleep.
But I've found that certain operators don't have enough intelligence in their PC's and over-charge you for using your computer beyond your stipulated time. For eg: suppose your free download time ends at 8AM in the morning and you start a 200MB download at 7:50AM. By 7:59:59 you'd have downloaded 150MB and then by 8:03AM you download the remaining 50MB. But the stupid/whatever telco would charge you for the whole 200MB!!! In case you have had this problem use this work around.
The batch file below will simple issue commands to ur modem to disconnect and reconnect to the network. This way you'll have a time-stamp to disprove the telco.

Type out the lines between <---start of code----> and <---End of Code---> into notepad and save it as "bsnl.bat" or anything for that matter, the extension should be "*.bat"
<-------------------------------------Start of code--------------------------------------------------------->


Rem  batch file to Automatically reset modem
Echo off
cd C:\Program Files\Mozilla Firefox\
start firefox.exe
 

@ping 127.0.0.1 -n 4 -w 1000> nul  
 start firefox.exe http://admin:******@192.168.1.1/hwhtml/status/st_ppp_discon.html?ImServices.rfc1483-0.1


@ping 127.0.0.1 -n 4 -w 1000> nul
start firefox.exe http://admin:*****@192.168.1.1/hwhtml/status/st_ppp_connect.html?ImServices.rfc1483-0.1





<----------------------------------------------------End of Code----------------------------------------------------->


Code analysis: {skip it if you are okay using a random script }
line 1: it's simply a comment line
line 2: turn on Firefox {change the location if you installed firefox elsewheree}

line 3: this'll wait for a few milliseconds. This is to let firefox to turn on. 
line 4: this line of code will turn on firefox with the link shown. It'll simply disconnect the internet connection. 
line 5: another wait so that the modem has disconnected fully
line 6: this time we'll connect back to the network and the URL does just that




Now this batch file will be scheduled to run using Windows Scheduler. Schedule the batch file to be run twice. Once at around 2:11 Am. Just after the Computer is woken up by W.O.S.B and again just before the computer is shut down. that’s around 7-49AM in this case. Enjoy the limited unlimited plan with lots of sleep and no strings attached!

Contributors