[Tutor] internet access

Alan Gauld alan.gauld at btinternet.com
Thu Oct 11 17:58:53 CEST 2007


"shawn bright" <nephish at gmail.com> wrote

> messenger (gaim) all night if i didn't. i have a cron script that 
> checks the
> hour of day, if later than x pm. does
> os.system("/etc/init.d/network stop")
> os.system("chmod a-x /etc/init.d/network") ( so that a reboot 
> doesn't
> override it )

Whilst this is a Python list it might not always be the best solution.
In the case above a shell script is probably better since all you are
doing is calling shell commands.

I assume your cron is run as root?

Alan G 




More information about the Tutor mailing list