定时任务用 systemd timer 还是 cron?

Linuxsystemd 发布于 2026-05-12 · 分类:Linux 运维 · 阅读 980

cron 简单直接但日志和错误处理弱;systemd timer 能依赖服务、随机延迟、missed 后补跑、journalctl 统一看日志。对跑在 systemd 体系里的维护脚本,timer 往往更省心。

(本文为归档摘要,全文整理中。)