
You can see that the website blocker is already scheduled because I already scheduled testing on my computer. Carefully follow the subsequent scheduling instructions to schedule a website blocking on your computer.

Scheduling on Windows: scheduling the above scenario & # 82 12 a little trick, but I’ll walk you step by step

Now press i to enter insert / edit mode and write python_script_path.Write the following command in the terminal: sudo crontab -e.Scheduling the above script on Mac: For scheduling the above script on Mac, you must open crontab in your terminal as root. Special note for Windows users: user Wi ndows, you need to create a copy of the OS host file. Now give the path to the duplicate file in the hosts_path given in the script. If not any (website in line for website in website_list): With open (hosts_path, ’ r + ’ ) as file : # mapping hostnames to your local IP addressįile. # change the host path according to your OS

WEBSITE BLOCKER PYTHON MAC
Host file on Mac and Linux: / etc / hosts
