0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Fedora39でcrondを使えるようにする

Posted at

Fedora39でcrondを使おうと思ったら入っていなかったので使えるようにしました。

パッケージを調べる

[root@fed ~]# dnf provides cronie
Waiting for process with pid 294 to finish.
Last metadata expiration check: 0:00:17 ago on Sun Sep  1 03:39:45 2024.
cronie-1.6.1-5.fc39.x86_64 : Cron daemon for executing programs at set times
Repo        : fedora
Matched from:
Provide    : cronie = 1.6.1-5.fc39

cronieというパッケージで提供されているようです。

インストール

dnf install cronie

サービスの登録と開始

サービスの登録

systemctl enable crond

サービスの開始

systemctl start crond

タスクの登録

crontab -e

例として月初のAM03:00に再起動するように以下を入れます。

0 3 1 * * /sbin/shutdown -r now

以上です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?