You can do that simply by RASDIAL command, if you use PPPOE connection.
Follow the steps below :
1. Open NOTEPAD
Type the following
rasdial connection_name username password
Instead of connection_name, type your dial up name.
Replace the username and password with ur username and password.
While saving, name the file as connect.bat
2. Open one more new Notepad
Type the following
rasdial connection_name /DISCONNECT
Instead of connection_name, type your dial up name.
While saving, name the file as disconnect.bat
3. Then, open Start > Programs > Accessories > System Tools > Scheduled Tasks
Then Add a scheduled task
Select Next
Browse and open the connect.bat file and set the time for which the internet is to be connected
Follow the same for scheduling the task of disconnection using disconnect.bat file.
Hope u understand.
If u have doubts, ask.