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

Posted bcbobo21cn

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何在Linux系统上自动执行任务相关的知识,希望对你有一定的参考价值。

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 
主要候选人

以上是关于如何在Linux系统上自动执行任务的主要内容,如果未能解决你的问题,请参考以下文章

Linux学习之九-Linux系统定时任务

linux crontab定时执行任务

如何在 Linux 启动时自动执行命令或脚本

Linux设置定时任务

linux的cron不能自动执行的原因是啥

php 如果自动执行任务