Systemd 计时器仅在服务停止时启动
我有一个运行 python 脚本的服务: [Unit] Description="Daily python service" [Service] WorkingDirectory=/home/ubuntu/python_project/ ExecStartPre=/bin/bash -c 'truncate -s 0 /var/log/project.log /var/log/project_error.log' ExecStart=/home/ubuntu/.conda/envs/test/bin/python -u main.py StandardOu...