Do not sleep when you have to work!
That is musíš. See also my answer to Julia.
I got an email from DL today:
Thank you for suggesting “Don't sleep when you have to work” as a translation for “Nespi, když máš pracovat!”. We now accept this translation!
"supposed to" is not in this sentence
máš + infinitive = you are supposed + infinitive
I guess, you should also accept this translation "Don't sleep when you must work"