Linux script command, its own execution has a log, in the cron expression execution does not have a log, how to solve?

  1. linux script command. The shell script itself has log output, but there is no log in the cron expression. What is the reason and how to solve it?
  2. shell script command: nohup / tcps/modules/hadoop/hadoop-2.6.2/bin/hadoop jar/ tcps/modules/hadoop/jar/camus.jar com.linkedin.camus.etl.kafka.CamusJob-P / tcps/modules/hadoop/jar/camus.properties > > / tcps/modules/hadoop/logs/camus.log &
  3. cron expression command: 10 02 * nohup / tcps/modules/hadoop/hadoop-2.6.2/bin/hadoop jar/ tcps/modules/hadoop/jar/camus.jar com.linkedin.camus.etl.kafka.CamusJob-P / tcps/modules/hadoop/jar/camus.properties > > / tcps/modules/hadoop/logs/camus.log &
  4. The command in the
  5. cron expression is executed at 02:10 every morning, and the command itself is also executed, but there is no log output.
Mar.01,2021

The execution of the

cron expression does not require nohup and the following & . At the same time, add the output to 2 > & 1

after the command.

that is:

10 02 * * * USER /tcps/modules/hadoop/hadoop-2.6.2/bin/hadoop jar /tcps/modules/hadoop/jar/camus.jar com.linkedin.camus.etl.kafka.CamusJob -P /tcps/modules/hadoop/jar/camus.properties >> /tcps/modules/hadoop/logs/camus.log  2>&1
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3217b-2bdec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3217b-2bdec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?