1
1

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 3 years have passed since last update.

Jetson Xavier 起動時にコマンド実行

Posted at

覚書として。。。
Jetson起動時に指定プログラムを実行する設定を行う。

1./etc/rc.local 以下に指定ファイル格納

sudo /etc/rc.local

最初の一行目は'#!/bin/sh'を入力。

システム起動時に一度だけ実行するCron(クローン)の設定

              string         meaning
              ------         -------
              @reboot        Run once, at startup.
              @yearly        Run once a year, "0 0 1 1 *".
              @annually      (same as @yearly)
              @monthly       Run once a month, "0 0 1 * *".
              @weekly        Run once a week, "0 0 * * 0".
              @daily         Run once a day, "0 0 * * *".
              @midnight      (same as @daily)
              @hourly        Run once an hour, "0 * * * *".

cronの実行ログを残す設定

rsyslogの設定ファイル下記参照(JetsonXavierの場合)

/etc/rsyslog.d/50-default.conf

を開くと

# cron.*				/var/log/cron.log

#でコメントアウトされているので、#を消去。これをnanoコマンドで行う。

sudo nano /etc/rsyslog.d/50-default.conf

ログを確認

tail -f /var/log/cron.log

参考

LINK:初心者向けシェルスクリプトの

【cron】定期的に処理を行う【MacOS】【Linux】

cron力をつけよう!全てのcrontab入門者に贈る9個のテクニック

1
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?