- Learning Linux Shell Scripting
- Ganesh Sanjiv Naik
- 229字
- 2021-08-20 10:44:30
Understanding "at"
Many a times 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 utility of the at
command. To use the at
command, the syntax is as follows:
$ at time date
The following are the examples of the at
command:
- The
Control + D
command will save theat
job. The task will be executed at 11.15 A.M. This command will log messages to thelog.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 e-mail 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 which 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
推薦閱讀
- Learning Chef
- Blender 3D Incredible Machines
- Learn React with TypeScript 3
- Linux操作系統(tǒng)基礎(chǔ)案例教程
- Cocos2d-x學(xué)習(xí)筆記:完全掌握Lua API與游戲項(xiàng)目開(kāi)發(fā) (未來(lái)書(shū)庫(kù))
- 微信小程序入門指南
- C# 8.0核心技術(shù)指南(原書(shū)第8版)
- 低代碼平臺(tái)開(kāi)發(fā)實(shí)踐:基于React
- 編程菜鳥(niǎo)學(xué)Python數(shù)據(jù)分析
- Machine Learning in Java
- Scratch趣味編程:陪孩子像搭積木一樣學(xué)編程
- Extending Unity with Editor Scripting
- SSH框架企業(yè)級(jí)應(yīng)用實(shí)戰(zhàn)
- UML基礎(chǔ)與Rose建模實(shí)用教程(第三版)
- HTML5程序設(shè)計(jì)基礎(chǔ)教程