In order to have a good night's sleep every day, please ask Ubuntu to remind you that it is time to go to bed, and you have to stop the system. Well, it's actually a scheduled task. The detailed steps are as follows: 1. Open/etc/crontabsudogedit/etc/crontab2 and add the following command (replace manker with your username) 2523 ** 0-4manker/usr/bin/zenity -- display: 0
In order to have a good night's sleep every day, please ask Ubuntu to remind you that it is time to go to bed, and you have to stop the system.
Well, it's actually a scheduled task.
The detailed steps are as follows:
1. Open/etc/crontab
Sudo gedit/etc/crontab
2. Add the following command (replace manker with your username)
25 23 ** 0-4 manker/usr/bin/zenity -- display: 0 -- warning -- text = "Shutdown in 5 minutes. Go to bed ."
25 23 ** 0-4 root shutdown-h + 5
Note:
Part 1 25 23 ** 0-4 refers to the period from Sunday (day 0) )~ Run the command at every day on Thursday (day 4. Reference
The command zenity function displays a string of reminder text in the Gtk + dialog box. (Replace the manker with your current user name for normal display)
Shutdown-h + 5 means that the system will automatically shut down after five minutes.