During the school year, one of the best tools I use to stay on task is the Chrome extension StayFocusd. It tracks how much time you've spent on certain websites, and when you hit a daily time limit it blocks those sites.
There are three exceptionally awesome things about the extension. The first is how customizable it is. You set the websites that you know are your personal temptations. You tell it when to enforce the rules. You tell it how long to let you visit those sites before shutting you down. I, for example, have it set to allow me a total of 30 minutes on my "banned" websites list - which includes Facebook, Twitter, Amazon, and Netflix - between 8am and 5pm. That way I only have the potential to spend 30 minutes goofing around in that prime grading time after my last class ends and before I go home.
The second awesome thing is how foolproof it is. Any change you make to the settings takes effect 24 hours after you submit the change. Adjusting your allowed minutes per day, changing enforced hours, and changing enforced days are all possible, but you have to wait a whole day before taking advantage of the new parameters. That knocks out a whole lot of temptation.
Then there's the third awesome part: it's called the "nuclear option." You can use it when you really need to knuckle down, because it blocks *all* websites (or a set list, or all except a set list) for a given period of time. The only drawback, which is really a feature, is that if you end up wanting to get to a blocked site, you can't. There is no way to cancel the nuclear option once you've set it.
Every Thursday is "Favorite Things" day, where I bring you a short recommendation of a product or service that I have found useful and/or helpful. Unless I say something, I'm not paid or compensated in any way for the plug. I just do it out of the goodness of my heart.