摘要: 解决办法 要定时执行的shell脚本开头引入你自己有访问权限的环境变量文件: #!/bin/sh . /home/hsy/.profile(这是Ubuntu的,如果是CentOS就改成bash_profile) . /home/hsy/.bashrc # 以下写你脚本的内容 crontab -e要这 阅读全文