Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jun 2025 06:35:37 +0900
From:      Yoshito Takeuchi <kinchan@kinchan.com>
To:        freebsd-users-jp@freebsd.org
Subject:   =?UTF-8?B?L2V0Yy9jcm9udGFiIOOBrue3qOmbhuaWueazlQ==?=
Message-ID:  <CALDx8qVmtpjFNOQCCZxLi5Sg4581cKayixaxfP_KaiAAJgdNOw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help

竹内と申します。
毎日のシステムチェックなどをしてくれている
/etc/crontab
を編集したいのですが直接これを編集してよいのでしょうか?
/usr/local/etc/crontab とかあるのか調べたのですが分かりませんでした。

こうする理由ですが、なにかをきっかけに cron 実行後、その内容が
メールされますが、内容が文字化けするようになってしまいました。
例えば今まで

33 3 * * * /usr/local/bin/certbot renew --max-log-backups 20

1行の cron を動かしてうまくいっていたのですが、ある日を境に実行後のメール内容が

Saving debug log to /var/log/letsencrypt/letsencrypt.log<br /><br />-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -=<br /> - -<br />Processing
/usr/local/etc/letsencrypt/renewal/kinchan.com.conf<br />- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=<br /> -
-<br />Certificate not yet due for renewal<br /><br />- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -=<br /> -
-<br />The following certificates are not due for renewal yet:<br />
/usr/local/etc/letsencrypt/live/kinchan.com/fullchain.pem expires on
=<br />2025-08-01 (skipped)<br />No renewals were attempted.<br />- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-=<br /> - -<br />

のような文字化け?をおこすようになりました。ググった結果
SHELL=/usr/local/bin/bash
MAILTO=example@example.com

# 例: UTF-8を指定する場合
LANG=ja_JP.UTF-8
LC_ALL=ja_JP.UTF-8
を追加することで解決したように思います。
そこで /etc/crontab にも同じようにしようと思ったのですが、/etc/crontab を直接編集してもよいのか疑問となり本質問メールとなりました。
ご教示、ご指南頂けると幸いです。
失礼します。


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALDx8qVmtpjFNOQCCZxLi5Sg4581cKayixaxfP_KaiAAJgdNOw>