如何在Linux系统上自动执行任务

本文介绍了如何在Linux系统中自动化执行任务,重点讲解了'at'和'cron'这两个常用工具。'at'适用于一次性定时任务,如当你的老板需要了解外部顾问登录网络的频率时。而'cron'则更适合定期执行的任务,如日志文件的轮换。理解并掌握这两个工具,能有效提高系统管理员的工作效率。
摘要由CSDN通过智能技术生成

How to automate tasks on a Linux system
如何在Linux系统上自动执行任务

https://www.linux.org/threads/how-to-automate-tasks-on-a-linux-system.4144/

You don't have to do that yourself!One of the main tasks of a system administrator is carrying out maintenance work on the server. Most of these tasks can be automated or programmed to be carried out at certain times without user intervention. In this section we'll talk about the two most widely used programs to carry out tasks in this way.
你不用自己动手做所有的事。系统管理员一个主要的任务就是维护服务器。大多数这些任务可以在确定的时间被自动或程序化执行,不需要用户干预。本节我们讨论以这种方式执行的两个最广泛使用的程序。

carry out
v:展开,行,执,施行,施

maintenance
n:维修,维护,维持,保持,保养,

intervention
n:干预,干涉,介入,

Use of 'at'
at的使用

'at' is a program to carry out commands that you intend to do only once. It's mostly used for scheduling specific jobs under specific circumstances. If you had to rotate your company's webserver logs every Saturday, 'at' is not the appropriate tool for the job. That would be done best with 'cron', about which we will talk about shortly. Let say your boss, the CTO, called for a meeting with you at 1:00. He wants to know how frequently your external consultants are logging into the network. This is a prime candidate for 'at'.
at是一个程序,用来执行你打算只运行一次的命令。大多数情况它用来在特定情形下调度指定作业。如果你必须在每周六轮换你公司的web服务器日志,at不适合于这项任务。这最好使用 'cron' ,我们将在稍后讨论。比方说你的老板,CTO,要在1:00点和你开会。他想知道外部顾问登录网络的频率。这种情况最适合使用at。

intend to
v:有心

circumstances
n:光景,情境,情形,场景

specific
a:特定,具体,

rotate
v:转动,轮流,轮作,轮换,

let's say
比如说;说一说;

called for a meeting 
召集会议

consultant
n:顾问,医生

prime candidate 
主要候选人

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值