This is a python script which runs in the background and blocks websites from being accessed during a particular time by redirecting the website to another address.
- On Windows, open Task Scheduler.
- Create a task under the 'Actions" pane and give it a name.
- Configure the task for your OS version.
- Checklist 'Run with highest privileges' so the script can access the admin folders.
- Go to triggers and choose when you want the script to run.
- Under the action tab select 'Start a program' then locate the 'website_blocker' on your system and click 'OK'.
- The script will run when next the pc is turned on or restarted.
Script.Modification.mov
A video on how to set up the script and the task manager is also included.
Website.Blocker.Setup.mov
- You can add as many sites to the script as you want just go to 'website_list' and a site to the list.
- You can also edit the times at which the script blocks a website by going to line 17 and changing 8(starting hour of the script) and 15(ending hour of the script).