/var/log/cron可以查看crontab执行了哪些定时任务 解决方案:初始化定时任务所要使用的环境变量,比如source /etc/profile #!/bin/bash source /etc/profile #定时任务