How can I write a cron job that will block my internet from 7pm to 7am? (So I can get some sleep)
Fresh3 days ago
Mar 15, 20263427 viewsConfidence Score0%
0%
Problem
I am using OSX 10.6 and it has cron built in. How can I write a cron job that will block my internet from 7pm to 7am every day? Im sure this must be simple but I could only find one example online and it didn't work. It said to: I did this and google still came up.
Error Output
set /etc/hosts.allow file to be empty set hosts.deny file to ALL : ALL
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How can I write a cron job that will block my internet from 7pm to 7am? (So I can get some sleep)
Low Risk
After spending many hours trying to debug an issue with the job not running from root, I was able to get what you said working. Here are my exact steps: In the terminal type: Then type: and that does it! Credit to @Amardeep and @Stephenr for their c…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix