- Learning Linux Shell Scripting
- Ganesh Naik
- 228字
- 2021-06-25 22:02:48
Understanding "at"
Many a time, we need to schedule a task for a future time, say in the evening at 8 p.m. on a specific day. We can use the at command in such a situation.
Sometimes, we need to repeat the same task at a specific time, periodically, every day, or every month. In such situations, we can use the crontab command.
Let's learn more about the use of the at command. To use the at command, the syntax is as follows:
$ at time date
The following are examples of the at command:
- The Ctrl + D command will save the at job. The task will be executed at 11.15 A.M. This command will log messages to the log.txt file at 11.15 a.m.:
$ at 11.15 AM at > echo "Hello World" > $HOME/log.txt at > Control + D
- The following command will send an email on March 31, 2015, at 10 A.M.:
$ at 10am mar 31 2015 at> echo "taxes due" | mail jon at> ^D
- The following command will make the task run on May 20 at 11 A.M.:
$ at 11 am may 20
- All the jobs that are scheduled by the at command can be listed using the following command:
$ atq
- To remove a specific job listed by the atq command, we can use the following command:
$ atrm job-id
推薦閱讀
- 大數(shù)據(jù)技術(shù)與應(yīng)用基礎(chǔ)
- 網(wǎng)絡(luò)服務(wù)器架設(shè)(Windows Server+Linux Server)
- PostgreSQL 11 Server Side Programming Quick Start Guide
- TestStand工業(yè)自動化測試管理(典藏版)
- Mastering Machine Learning Algorithms
- 讓每張照片都成為佳作的Photoshop后期技法
- 具比例時滯遞歸神經(jīng)網(wǎng)絡(luò)的穩(wěn)定性及其仿真與應(yīng)用
- Docker on Amazon Web Services
- 基于企業(yè)網(wǎng)站的顧客感知服務(wù)質(zhì)量評價理論模型與實(shí)證研究
- JRuby語言實(shí)戰(zhàn)技術(shù)
- 與人共融機(jī)器人的關(guān)節(jié)力矩測量技術(shù)
- 傳感器原理與工程應(yīng)用
- 中文版Photoshop情境實(shí)訓(xùn)教程
- PostgreSQL High Performance Cookbook
- 多媒體技術(shù)應(yīng)用教程