不知道具体原因,非root用户,通过crontab设置定时任务不起作用
解决方法:
00 03 * * * . /etc/profile; /bin/sh /mnt/test1.sh 01 03 * * * . /etc/profile; /bin/sh /mnt/test2.sh
注意一定要添加“ . /etc/profile;" ,这句用于将环境变量include进当前脚本的执行环境!否则不执行