At command usage

Source: Internet
Author: User
The at command can execute the specified task at the specified time.
The crontab command can periodically execute some characters.
Differences:
At: the process is canceled from the Linux system once the worker executes it.
Crontab: this job will be routine.

Usage 1:
Command Line input:
At tomorrow:
Warning: commands will be executed using/bin/sh
At> enter the command to be executed after the time. You can enter multiple lines and press Ctrl + D.
You can.

Usage 2:
Save the command as a file and then execute:
At-F file name: Tomorrow press Enter.
It is best to add executable permissions to this file.
In addition, if you want to restart, consider the root permission issue.

Note: Your runningProgramIt will be executed, but it is not displayed. To display the data, you must specify the display position. For example
At now + 1 minutes
Warning: commands will be executed using/bin/sh
At> export display =: 0 & Firefox
At> <EOT>
One minute later, Firefox will be displayed on 0th desktops.

Or you can test the AT command to run it:
Touch ~ /Amai

You can also use the AT command as a reminder under X.
Run the following command:
At 12: 00
Mail =/dev/null display =: 0 zenity -- info -- text "Time to lunch"
At> [Ctrl + D]
PS. Set mail =/dev/null at the at prompt so that no email will be sent after the reminder is complete.
Execution result:

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.