linux 看执行任务的一些邮件

 cat /var/spool/mail/root 

From [email protected]  Fri Apr 12 18:44:01 2019
Return-Path: <root@hadoop01.localdomain>
X-Original-To: root
Delivered-To: [email protected]
Received: by hadoop01.localdomain (Postfix, from userid 0)
    id EBCFD1C081C; Fri, 12 Apr 2019 18:44:01 +0800 (CST)
From: [email protected] (Cron Daemon)
To: [email protected]
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: <[email protected]>
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  刷新一下环境变量

猜你喜欢

转载自www.cnblogs.com/hejunhong/p/10697880.html