Scheduling eth0

Asked by Rajinder Sandhu

want to disconnect eth0 (NIC Card /my adsl modem) at 0800 hrs.
Please help...
Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cron Edit question
Assignee:
No assignee Edit question
Solved by:
Dr Paul Brewer
Solved:
Last query:
Last reply:
Revision history for this message
Rajinder Sandhu (sandy744) said :
#1

using ubuntu 9.04

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#2

Please tell do you want to do this every days or only this morning at 8:00 ...

Thank you

Revision history for this message
Rajinder Sandhu (sandy744) said :
#3

it is required on daily basis.... now my OS is U9.10
Installed U9.10 beta yesterday..... it has better management for changing run level comparing to U9.04 still not checked fully./

Revision history for this message
Best Dr Paul Brewer (drpaulbrewer) said :
#4

Create a cron entry for root that runs at 0800
(man cron or man crontab or google for how to use cron to see how)

One command to stop eth0 is
ifconfig eth0 down

Or alternatively you could
/etc/init.d/network stop
which would take all networking down

You might also need a cron entry to start it again that runs
/etc/init.d/network restart

Revision history for this message
Rajinder Sandhu (sandy744) said :
#5

it is on daily basis
Thanks

On Sat, Oct 17, 2009 at 7:01 AM, marcobra (Marco Braida) <
<email address hidden>> wrote:

> Your question #86076 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/86076
>
> Status: Open => Needs information
>
> marcobra (Marco Braida) requested for more information:
> Please tell do you want to do this every days or only this morning at
> 8:00 ...
>
> Thank you
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/86076
>
> You received this question notification because you are a direct
> subscriber of the question.
>

--
Warm regards,

Rajinder Sandhu
Bangalore
India

Revision history for this message
Rajinder Sandhu (sandy744) said :
#6

checked and found ifconfig eth0 down and up commands are working fine, I will use the same...
Thanks for your suggestion Dr. Paul

Revision history for this message
Rajinder Sandhu (sandy744) said :
#7

That Solved my question

Revision history for this message
Rajinder Sandhu (sandy744) said :
#8

Thanks Dr Paul Brewer, that solved my question.