Ubuntu 定时任务设置指南
一 使用 Cron 快速上手
二 常用 Cron 示例
三 运行环境与日志排错
四 进阶方案
[Unit]
Description=My script service
[Service]
Type=simple
ExecStart=/path/to/your/script.sh
[Unit]
Description=Run my script every hour
[Timer]
OnBootSec=1min
OnUnitActiveSec=1h
Unit=my_script.service
[Install]
WantedBy=timers.target