在linux中使用crontab定时任务报错:hadoop not found
报错信息
ERROR: hadoop not found
ERROR: JAVA_HOME is not set and could not be found.
原因:缺少环境变量
解决方案
30 08 */7 * * source /etc/profile; /opt/module/hadoop-3.1.3/bin/hadoop balancer -Threshold 5 > /cluster/vdb/balancer_log.txt 2>&1 &