Use Ubuntu for hypnosis

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.