Tested FREEBSD version was 11.2 Stable, after I config all environment , I post some script from other linux.
And it not work, how ever I modify codes, It’s not work correctly.
Finally I find a article discuss this issue. It’s system bug, and has been fixed in FreeBSD 12.X.
An additional technique to help with debugging and running cron jobs: Take whatever program you run, and wrap it in a shell script. Design the script such that in the normal case (success), it creates absolutely no output on either stdout or stderr. Like that you get no e-mail if everything is working. What to do when something goes wrong? There are two schools of thought: (1) Let the command run normally, and cron will mail the potentially complex output to the user. (2) Catch all the output in the script, and store it in a well-known location like /var/log. Then in case of failure, output just one line: “foobar failed, please see /var/log/foobar_20181214.error.log for details”.
In this particular case: certbot is a python script, which probably relies on certain environment settings to find its libraries and configuration. Cron deliberately strips the environment for safety reasons. This could easily cause certbot to fail, perhaps silently if the e-mail output from cron is broken.
And I move these script to FreeBSD 12.1, and it’s working without any modify.
Reference
1.Cron Not Running
2.Script not running from Cron
3.Script doesn’t run when executed in cron
隨機文章
- 網紅律師的法庭外傳奇:論「臉書勝訴、現實慘輸」之行為藝術 (2026-01-17)
- 破解Facebook帳號認證封鎖:蕃外篇 II WebProxy (2012-02-26)
- 解決 公司內用微軟 DNS 使用免費的CloudFlare dns loop SSL 憑證困擾 (2021-12-09)
- 戰神門檻通膨中:張惇涵的「高級酸」是政績還是人血饅頭? (2026-01-23)
- Angry Bird(憤怒鳥) PC版 (2011-06-13)



![[chatGPT 測試] DSM 7 有什麼特色](https://chihping.aflypen.com/wp-content/uploads/2023/03/usb-ga13f61ece_1280-300x221.jpg)




