1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-09-02 16:33:50 +02:00

cron, crontab: add Chinese translation (#17854)

This commit is contained in:
Sam Hou 2025-08-29 03:26:46 +08:00 committed by GitHub
parent 118c619de0
commit 1dfc7ce31d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 44 additions and 0 deletions

8
pages.zh/common/cron.md Normal file
View file

@ -0,0 +1,8 @@
# cron
> 一个系统任务计划程序,用于无人值守运行工作或任务。
> 提交、修改或删除 `cron` 任务条目的命令,是 `crontab`.
- 查看管理 `cron` 条目的文档:
`tldr crontab`

View file

@ -0,0 +1,36 @@
# crontab
> 为当前用户计划 cron 任务,按照时间间隔运行。
> 更多信息:<https://manned.org/crontab>.
- 编辑当前用户的 crontab 文件:
`crontab -e`
- 为特定用户修改 crontab 文件:
`sudo crontab -e -u {{用户}}`
- 用指定文件的内容,覆盖当前的 crontab 文件:
`crontab {{路径/到/文件}}`
- 查看当前用户,现存的 cron 任务列表:
`crontab -l`
- 移除当前用户的所有 cron 任务:
`crontab -r`
- 每天 10:00 运行任务的示例(* 表示任意值):
`0 10 * * * {{要_运行的_命令}}`
- 每 10 分钟运行命令的 crontab 任务条目示例:
`*/10 * * * * {{要_运行的_命令}}`
- 每周五的 02:30 运行指定脚本的 crontab 任务条目示例:
`30 2 * * Fri /{{路径/到/脚本.sh}}`