I have a schedule and a daily page count goal. I also try to have more than one project to work on at a time. All of these help to make certain that, if I get blocked on one project, I have something else to work on. I've had this routine for years, so that helps keep writer's block away. The more you get into the habit of writing, the more you tend to stick to writing, and the less of a chance there is of you getting blocked.