One word: agenda.
Instead of doing stuff whenever you feel like doing, just schedule your tasks accordingly.
I'm using Google Calendar myself, I make a schedule like a whole month in advance.
A successful schedule looks like this:
Schedule your school and/or work hours first, as you have no control over them yourself.
Schedule all your appointments you've already made.
Schedule your learning and other activities now.
This really helps me improving my Japanese, learning Russian and working on multiple hobby projects, without interference with work.