I try to get a bash script running that should output the java process information to a file. Unfortunately when I add it to the
crontab -e the script is not executed.
root the script is located in /root/bin
#!/bin/bash PATH=/bin DATE=`date +%Y-%m-%d" "%H:%M` PROCESSINFO=`ps aux | grep java | grep -v grep` echo "$DATE $PROCESSINFO" >> java.log
This is the
crontab -e configuration
* * * * * /root/jobs/log-crush-ftp-process.sh * * * * * printf "test\n"
printf "test\n" is just a test, but since the output will only go in the mail there is no result on the screen. What am I missing?
Also I have another question about Java processes. Since everything is running in a runtime enviroment, is there a command where I can get more detailed information about the processes inside the JVM?
I deleted the last line
printf... and now I get mails for the script. But still no output in the