-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5678cb4
commit ba807c5
Showing
78 changed files
with
2,254 additions
and
1,068 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
# 【Crontab】基本介绍 | ||
|
||
## 目录 | ||
- [1. 目录](#目录) | ||
- [2. 概述](#概述) | ||
- [3. 基础知识](#基础知识) | ||
- [工作原理](#工作原理) | ||
- [语法格式](#语法格式) | ||
- [4. 常用命令](#常用命令) | ||
- [5. 实用示例](#实用示例) | ||
- [系统维护](#系统维护) | ||
- [监控告警](#监控告警) | ||
- [定时任务](#定时任务) | ||
- [6. 最佳实践](#最佳实践) | ||
- [7. 故障排查](#故障排查) | ||
- [8. 安全建议](#安全建议) | ||
- [9. 快速参考](#快速参考) | ||
- [常用时间表达式](#常用时间表达式) | ||
- [特殊配置](#特殊配置) | ||
|
||
|
||
|
||
## 概述 | ||
|
||
Crontab(Cron Table)是Unix/Linux系统中的任务调度工具,它允许用户在指定的时间间隔自动执行命令或脚本。无论是系统管理、自动化运维,还是定期数据处理,Crontab都是一个不可或缺的工具。 | ||
|
@@ -56,7 +76,7 @@ service cron status # Debian/Ubuntu | |
|
||
## 实用示例 | ||
|
||
### 1. 系统维护 | ||
### 系统维护 | ||
|
||
```bash | ||
# 每天凌晨2点备份数据库 | ||
|
@@ -69,7 +89,7 @@ service cron status # Debian/Ubuntu | |
0 4 1 * * /scripts/system_update.sh | ||
``` | ||
|
||
### 2. 监控告警 | ||
### 监控告警 | ||
|
||
```bash | ||
# 每5分钟检查服务状态 | ||
|
@@ -79,7 +99,7 @@ service cron status # Debian/Ubuntu | |
0 * * * * /scripts/disk_space_check.sh | mail -s "Disk Space Report" [email protected] | ||
``` | ||
|
||
### 3. 定时任务 | ||
### 定时任务 | ||
|
||
```bash | ||
# 工作日每天早上9点执行 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.