I want to stop browsing after midnight and in order to do so:
I've made at /Users/sergeart/Desktop file called
goToSleep.sh
:pid=$(pgrep -xn "Safari") kill $pid
I've created crontab (with crontab -e) where I put
0-59 0-6 * * * bash /Users/sergeart/Desktop/goToSleep.sh
I expect cron
will run goToSleep.sh
script every minute after midnight till 6am, but unfortunately Safari
is still working.
What do I miss?