1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS7で定期的にリブートする方法

Posted at

1.rebootシェルを作成

reboot.sh
sudo shutdown -r now

2.cronを起動

crontab -e

3.cronを設定

任意の日時にリブートシェルを実行

* * * * * [実行コマンド]

4.起動確認

  • 以下のコマンドでcronが起動した日時がわかる
cat /var/log/cron
  • 以下のコマンドで再起動した日時がわかる
last reboot
1
2
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?