ブログ記事「電源OFFのRaspberryPiからセンサーデータを取得するバッチ処理を作る」のサンプルソース https://qiita.com/shikajiro/private/47cb04ccad6771f4ae5a