How to start broadband connection at a scheduled time?

Hi,
I’ve a ADSL broadband connection in bridged mode. I use Kinternet to manually connect to internet. I’ve a limited bandwith net connection which provides unlimited downloads between 2.00-8.00AM.
I wish to know how can I conect to net automatically at this time.
I’ve tried to use Kcron but without any effect.
I’ve also tried “ifup dsl0” but I can not run this without entering superuser mode.
I’ve tried to keep running my net connection and scheduling downloads in Ktorrent. But when kept idle, the connecion disconnects after sometime. I’ve entered Idle Time Out as 0 in DSL settings.
I’m a new user of Linux and not at all conversant with scripting. So, somebody please help.

You would be better using the software to do this.

ktorrent and vuze (azureus) both have scheduling plugins and have worked for me in the past.

I dumped my ISP to a better deal - you get what you pay for
I’m adsl max here in uk
with ukfsn.org (entanet) 30/300max package

Can’t it be done a script? Though I’m inexperienced, I think its not that complicated?
I’m using the Ktorrent scheduling plugin presently. But I’ve a problem there:

I’ve tried to keep running my net connection and scheduling downloads in Ktorrent. But when kept idle, the connecion disconnects after sometime. I’ve entered Idle Time Out as 0 in DSL settings

Here in India unlimited broadband access is not that cheap.
Somebody with the experience of scripting please help.


Arup

Yes, your script WANTS to be in superuser-mode, as that’s where networking
is controlled from.

There’s a similar article here:
SDB:Starting YaST Online Update from a cron Job or Script - openSUSE
which sets up a cron-job, which is what you want.

Hope that’s enough detail to get you going…

Dave

Please help me to make a script to:
(i) enter super user mode and
(ii) run “ifup dsl0”
It can then be easily run with Kcron

Executing sudo -i and /sbin/ifup dsl0 from terminal starts the net.

Now pls tell me why this doesn’t work:

#!/bin/sh
sudo -i
/sbin/ifup dsl0
exit 0

I’ve removed password for sudo by using Yast also made the file executible from the properties.