Help with running crontab from root

Posted by user242065 on Super User See other posts from Super User or by user242065
Published on 2010-06-12T05:13:20Z Indexed on 2010/06/13 0:53 UTC
Read the original article Hit count: 396

Filed under:
|
|
|

Im using OSX and having trouble getting a cron job to run. I type the following:

$ sudo -i
$ crontab -e

I then enter:

* * * * * root ifconfig en0 down > /dev/null
0 19 * * * root ifconfig en0 down > /dev/null
0  7 * * * root ifconfig en0 up > /dev/null

and no success, the first line is for testing. I want it to shut off my internet. The next two lines I plan to leave in, once I get this working.

If I type this in to the terminal the internet goes off

ifconfig en0 down

Why is my cron job not shutting down the internet?

FYI: This is a follow up question from http://stackoverflow.com/questions/3027362/how-can-i-write-a-cron-job-that-will-block-my-internet-from-7pm-to-7am-so-i-can most of the comments there are people making fun of me. And a few attempts to solve the problem with out cron jobs.

© Super User or respective owner

Related posts about osx

Related posts about cron