Help with running crontab from root
- by user242065
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.