I have a bash script:start_jenkins.sh which starts a java process.
the command in the script start_jenkins.sh is
#!/bin/bash
echo "starting Jenkins service...... "
nohup java -jar /local/home/mona/jenkins/jenkins.war --httpPort=2261 > nohup_jenkins.out 2>&1 &
echo "Jenkins started .................."
my cronjob setup is
11 18 * * 2 nohup sh /local/home/mona/jenkins/start_jenkins.sh > /local/home/mona/jenkins/logs/jenkins_`date +\%Y\%m\%d\%H\%M\%S`.log 2>&1
When i am running it manually i am getting log entry in the file : jenkins.out & i can see java process is running.
but when i have scheduled it through cron job its not running. i am not getting any entry in the file jenkins.out while log are entered for echo commands