Use the Gnome screensaver to enforce bedtime or otherwise lock out the computer
Note that the actual time it warns the user is whenever you call the script, so you can use more granularity than an hour, can set it for different times on different days, etc.
Start the script with a crontab line like this:
05 23 * * 0-4 env DISPLAY=:0.0 /home/username/Applications/bedtime.py #JOB_ID_2
This starts the countdown at 11:05 PM Monday through Friday... I think. Crontab's syntax is unintuitive, indecipherable nonsense.
You need the DISPLAY bit or it won't work.