1. 如果是sh脚本: 直接在脚本前面加上: source /etc/profile 2. 如果是python: source /etc/profile && python /mypath/myscript.py ... 原因:crontab 不能自动从用户profile文件中读取环境变量参数。具体解释 如果没有生效,可以重启crontab服务,/etc/init.d/crond restart ; 参考网页