BSNL Night-time, connect automatically using scheduler

If you have the BSNL or any other PPPoE connection that gives you free time, like from 2 AM to 8 AM as in BSNL and you want to schedule your heavy downloads for that time, read this post.

The key idea here is to schedule using Windows Task Scheduler or Scheduled Tasks according to the version of windows you are using.

First thing to do, create a dial-up connection named BSNL in "network connections", chances are that you already have one.  If you're using auto-connection where you get net if you just turn on the modem, you should configure your modem/router to connect via PAP. To do this, type in http://192.168.1.1 in the address bar of your favorite browser (this is in a default setup, if your router is located at a different IP, enter that). You will need to enter an username and password, this is generally "admin" "admin" but can vary with the kind of router you are using. This should take you to the configuration page of your router, where you will set WAN to use PAP instead of AUTO in PPPoE.

Next thing, create a batch file in System32 (I say, System32, you could do this anywhere you want) to do this, goto Start -> Run -> type in "cmd" without quotes and hit enter

Once you have your command prompt, navigate to System32, under a default windows installation, this is what you have to do type in "CD C:\WINDOWS\SYSTEM32\" Once you are in system32, do the following

COPY CON CONNECT.BAT
@ECHO OFF
RASDIAL BSNL USERNAME PASSWORD //Replace with your username and password
^Z  //CTRL+Z

You should type in the last line using CTRL+Z together don't literally type in ^Z. Now you made the connect.bat. Running this file should get you connected to the internet, you can test it by running connect.bat from command prompt.

Now open windows task scheduler and configure to run Connect.bat at 2:02 AM everyday.
Now using task-scheduler, you should also setup termination of connection and shutdown of machine at 8:00. You can do this either way, either you can simply disconnect the connection or shutdown the machine.

To disconnect the machine, setup a program to run at 7:58 every day. You could either run RASDIAL /DISCONNECT or to shutdown the machine, you can run SHUTDOWN.EXE /S /F /T 59

Hope that helped, if you still have any doubts, post it in the comments.

No comments:

Post a Comment