Sauerkraut is done fermenting when the bubbles stop coming up when you tap the side of the crock.
At typical room temp (75F) traditional kraut generally takes 4-5 weeks but can take as many as 6-7 weeks if your home/fermenting area is cooler. If your home/fermenting area is warmer it can take as few at 2-3 weeks, but the keeping quality will be lower. I have no idea about fermenting time or keeping quality of the "rush" method of fermenting by adding whey that is touted on this forum.
(sources for the above info = My (late) Oma, personal experience,
Keeping the Harvest 1980 by Nancy Chioffi & Gretchen Mead,
Better Homes and Gardens Home Canning and Freezing 1973, and
Ortho Books The Complete Book of Canning 1982 which has a huge section on traditional fermenting.)