12 lines
742 B
Markdown
12 lines
742 B
Markdown
# 20240222223759 systemdでtimerを使う
|
||
#tech #systemd #server
|
||
- ファイルが2つ必要 \*.serviceと、 \*.timer ファイル名は拡張子以外が同じである必要がある。
|
||
- enableにしたり、startしたりするのは、 timerの方。
|
||
- systemの方は `Type=oneshot`がいいかも。
|
||
- 「15分ごとに実行」は OnCalendar=*:0/15
|
||
|
||
|
||
## Refs.
|
||
- [Systemdのtimer設定チートシート(コマンドまとめ) - はまたんく](https://gamingpc.one/dev/systemd-timer-cheat/)
|
||
- [systemd timer every 15 minutes - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/126786/systemd-timer-every-15-minutes)
|
||
- [systemd.time](https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html)
|