First confirm that Ubuntu has been installed and runs crond:
Harry @ ubuntu :~ $ Sudo service cron status
Cron start/running, process 923
We will use producer Y-send to send the pop-up prompt message of bubbling and confirm whether to install it:
Harry @ ubuntu :~ $ Sending y-send-help
If not, install:
Harry @ ubuntu :~ $ Sudo apt-get install libnotify-bin
Then set the cron scheduled task:
Harry @ ubuntu :~ $ Sudo crontab-e
Select an editor and enter:
50 23 ***/sbin/shutdown-h 23:55
50 23 *** export DISPLAY =: 0.0; su-harry-c "Your Y-send-I/usr/share/icons/Humanity/emblems/48/emblem-danger.svg parent, it's time to wash and sleep !! In 5 minutes, www.111cn.net will be automatically shut down ""
53 23 * export DISPLAY =: 0.0; su-harry-c "Your Y-send-I/usr/share/icons/Humanity/emblems/48/emblem-danger.svg parent, it's time to wash and sleep !! Will automatically shut down in 2 minutes ""
Change the harry user name to your own. DISPLAY specifies the output terminal device. The pop-up reminder background icon can be set by yourself. Restart crond after setting:
Sudo service cron restart
PS: If there are 100,000 urgent events, you need to cancel automatic shutdown: sudo shutdown-c. There is also a simple and useful small software gnome-typing-monitor that comes with Ubuntu. This tool can be used to set a timed lock on the computer screen to remind you to wait for a while before working, set it here (UBUNTU 11.04 ):
System settings-> hardware-> keyboard-> Typing Break check Lock Screen to enforce typing break to set the Lock interval and duration.