You can motivate yourself by promising you will get something e.g promising yourself you will play computer games if you do the task or giving yourself a punishment for failure e.g you will have to do extra push ups in your morning routine the next day.
I like to set my goals in a place where I will see them frequently. Put it up as my social media status. Use a browser extension to remind me whenever I open a new tab. Put up a sticky note. That way if I start to drift, I can have these reminders to say, "Hey, are you still working on this?"
I am motivated by the fact of not returning to old habits and vices that are not good for me. I am also motivated by the idea of taking on the process and not giving up.