Use crontab in Ubuntu 14.04

Source: Internet
Author: User

Because I often do things too invested and didn't pay attention to the time, but didn't call my girlfriend at night, my girlfriend was a little unhappy, so I came up with an idea: Set a scheduled task, every night, a window pops up to remind me to contact my girlfriend. Starting work!

  

First, install the mail function (SUDO apt-Get install mailutils, and then the window will pop up, select Internet, that is, the second of all options ), if any error occurs (with additional output), crontab sends an email to the specified location (the mailto parameter in/etc/crontab ). Then run an xterm by crontab. An error message is displayed, indicating that the display parameter is not set. For details, refer to the two links: Setting ": 0 ". Therefore, according to the practice of the first post, write as: ***** export display =: 0.0 &/usr/bin/gedit (Open gedit once per minute on X Windows) my display is not followed. 0 is also acceptable. After that, I recorded the information to be displayed in a text file, started gedit with crontab to open the text, and set the target file to be opened for gedit, our goal is achieved ~~ My girlfriend is happy too ~~ The last article on display variables is provided. For more information, run the following command: $ man x

Use crontab in Ubuntu 14.04

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.