Automatic Network Shutdown / Restart

Darryl Moore darryl-90a536wCiRb3fQ9qLvQP4Q at public.gmane.org
Wed Dec 9 19:13:10 UTC 2009


If your kids don't turn on the machine until after 5pm then cron will
miss the job. Also, all they have to do is reboot the machine after the
5pm shutdown and it will come back up again.

You need to have a script that you run frequently. (5min) It will check
the time and bring up or shut down the interface as it required.

John Myshrall wrote:
> I'm trying to condition my kids into submission over dinner time and I
> am tired of the debate. Short of disabling the internet for their
> accounts I wanted to set up an automated process. There is some stuff
> going on here https://launchpad.net/webcontentcontrol I'm not interested
> in this at this time and it appears to not have a time lock out.
> 
> I'm trying to invoke at 17:00 ifconfig eth0 down and at 19:00 ifconfig
> eth0 up. I created a simple script for each command. I tested each and
> they work and they are both executable. I placed them in /bin and set up
> a root crontab job.
> 
> Both my home boxes are shut down at night and I think this is part of
> where what I want to do fails. IIRC Cron is meant for machines that are
> up 24/7 and anacron is used more so for infrequent task over a delay
> period. I'm new to using cron / anacron so I'm missing the point
> somewhere. I've read up that root doesn't have access to a user X
> session and think this may also be part on the problem.
> 
> Any help or suggestions would be appreciated.
> 
> John
> 
> 
> 
> 
> 
> -- 
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list