cronでつかう環境変数を crontab 以外にかきたい
なんかうまくやる方法ねえのかな、とおもってかんがえてみたけど、うまくやる方法はみあたらなかった。すくなくとも vixie cron だと無理っぽい。他の cron だとできるのかな。
On the Debian GNU/Linux system, cron supports the pam_env module, and loads the environment specified
by /etc/environment and /etc/security/pam_env.conf. However, the PAM setting do NOT override the set-
tings described above nor any settings in the crontab file itself. Note in particular that if you want
a PATH other than "/usr/bin:/bin", you will need to set it in the crontab file.
という話なんだけど、まあ微妙。PATH は設定できないみたいだし。
16:34 hirose31: crontabに書くか、コマンドごとなら env FOO=bar script とか環境設定とかするらっぱーから実行するとかすかねー
でやるか、なんか別の cron をつかうほうがよさそう。
Published: 2011-06-01(Wed) 08:12