In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to use the at command in Linux. It is very detailed and has a certain reference value. Friends who are interested must finish it!
The linux at command allows the user to specify the execution of a program or instruction at this particular time of TIME. The format of TIME is HH:MM, where HH is hour and MM is minute. You can even specify colloquial words such as am, pm, midnight, noon, teatime (that is, 4 p.m.).
At performs a task at a specified time
Add that the at command is used to execute a command at a specified time. At allows you to use a rather complex set of time-specific methods. It can accept the time specified in hh:mm (hours: minutes) of the day. If that time has passed, it will be executed the next day. Of course, you can also use vague words such as midnight (late at night), noon (noon) and teatime (tea time, usually 4 p.m.) to specify the time. Users can also use a 12-hour timing system, that is, adding AM (morning) or PM (afternoon) after the time to indicate whether it is morning or afternoon. You can also specify a specific date for the execution of the command, in the format of month day (month day) or mm/dd/yy (month / day / year) or dd.mm.yy (day. Month. Year). The specified date must follow the specified time.
All of the above are absolute timing, but you can also use relative timing, which is good for arranging orders that will be executed in the near future. The specified format is: now + count time-units,now is the current time, time-units is the time unit, here can be minutes (minutes), hours (hours), days (days), weeks (week). Count is the amount of time, whether it is days, hours, and so on. Another method of timing is to directly use today (today) and tomorrow (tomorrow) to specify the time to complete the command.
Syntax at [- V] [- Q queue] [- f file] [- mldbv] time at-c job [job.] Option-f: specify the task file containing specific instructions;-Q: specify the queue name of the new task;-l: display the list of tasks to be executed;-d: delete the specified task to be executed;-m: send E-mail to the user after the task has been executed. Parameter date time: specifies the date time when the task is executed.
Execute / bin/ls at 5: 00 p.m. Three days after the instance:
[root@localhost ~] # at 5pm+3 days at > / bin/ls at > job 7 at 2013-01-08 17:00 tomorrow at 17: 00, the output time to the specified file:
[root@localhost ~] # at 17:20 tomorrow at > date > / root/2013.log at > job 8 at 2013-01-06 17:20 scheduled tasks are set, before execution, we can use the atq command to check that the system is not performing work tasks:
[root@localhost ~] # atq 8 2013-01-06 17:20 a root 7 2013-01-08 17:00 a root delete the set task:
[root@localhost ~] # atq 8 2013-01-06 17:20 a root 7 2013-01-08 17:00 a root [root@localhost ~] # atrm 7 [root@localhost ~] # atq 8 2013-01-06 17:20 a root displays the contents of the tasks that have been set:
[root@localhost ~] # at-c 8 #! / bin/sh # atrun uid=0 gid=0 # mail root 0 umask 22 omit n characters here date > / root/2013.log is all the content of the article "how to use at commands in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.