cron の実装はたくさん存在しますが、デフォルトではそのいずれもインストールされません。代わりにベースシステムは systemd/タイマー を使用しています。
https://wiki.archlinux.jp/index.php/Cron
簡単に説明するとserviceとtimerというファイルをサービス化するようです。
sudo nano /etc/systemd/system/<シェル名>.service
[Unit]
Description=<シェル名>
[Service]
User=***
Group=wheel
Type=oneshot
WorkingDirectory=/home/****
ExecStart=/home/****/<シェル名>.sh
[Install]
WantedBy=timers.target
sudo nano /etc/systemd/system/<シェル名>.timer
[Unit]
Description=<シェル名>
[Timer]
OnBootSec=5
Unit=<シェル名>.service
[Install]
WantedBy=timers.target
systemctl daemon-reload
sudo systemctl enable <シェル名>.service
sudo systemctl enable <シェル名>.timer
Top comments (0)