[Bug 264976] crontab task fail to work if stdout redirected
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 264976] crontab task fail to work if stdout redirected"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 01 Jul 2022 21:58:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264976 --- Comment #2 from Dmitry Cheshkov <firstname.lastname@example.org> --- Actually, problem arose with mrtg script. in 12.3-stable the following line in the root crontab worked fine */5 * * * * /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg > /dev/null 2>&1 but in 13.1-stable does not. Removing of '> /dev/null 2>&1' makes mrtg working. Also, I found, that addition of 'env LANG=C' before '/usr/local/bin/mrtg' makes mrtg working with stdout+stderr redirection to /dev/null in 13.1-stable: */5 * * * * env LANG=C /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg > /dev/null 2>&1 -- You are receiving this mail because: You are the assignee for the bug.