linux 看执行任务的一些邮件

 cat /var/spool/mail/root 

From root@hadoop01.localdomain  Fri Apr 12 18:44:01 2019
Return-Path: <root@hadoop01.localdomain>
X-Original-To: root
Delivered-To: root@hadoop01.localdomain
Received: by hadoop01.localdomain (Postfix, from userid 0)
    id EBCFD1C081C; Fri, 12 Apr 2019 18:44:01 +0800 (CST)
From: root@hadoop01.localdomain (Cron Daemon)
To: root@hadoop01.localdomain
Subject: Cron <root@hadoop01> sh opt/data/smartAuditor.sh 10 
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Message-Id: <20190412104401.EBCFD1C081C@hadoop01.localdomain>
Date: Fri, 12 Apr 2019 18:44:01 +0800 (CST)

sh: opt/data/smartAuditor.sh: No such file or directory

指定定时任务  sh手动执行成功 ,contab执行失败  在脚本中添加 source /ect/profile  刷新一下环境变量

posted @ 2019-04-12 18:52  夜半钟声到客船  阅读(341)  评论(0编辑  收藏  举报