I am using jira v4.4.1#660-r161644 on a linux server (kernel: 2.6.9-67.ELhugemem) at the moment
I have created a custom script to start jira. it isschedule to run it once a week in crontab because our development server reboot weekly.
#!/bin/bash JIRAHOME=~/atlassian/jira $JIRAHOME/bin/start-jira.sh
However the jira server is not started. If I run this command manually in shell it works just fine.
I have checked the cron log and I am sure the script get executed at the scheduled time. The x flag of the script is set and the path is correct.
What can cause this to happend?
EDIT
Will it help if I pass a -fg parameter to the command?
Turns out it has somthing to do with the cron job definition
I have this line in cron job
30 06 * * 1-5 /home/uat/bin/jira.start >> ~/logs/cron.`date +YYMMDD`.log
(It is not exactly YYMMDD but I have forgot to keep a record of the old cron line)
Somehow changing it to this one solve the problem
30 06 * * 1-5 /home/uat/bin/jira.start >> ~/logs/cron.`date +\%Y-\%m-\%d`.log
So it is not a problem within the script itself.
You need to set either JAVA_HOME or JRE_HOME in the crontab. Your .profile is being ignored by cron.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you check the user permissions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. When I said I have run it in shell, I have actually su into the relevant account beforehand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
under what user this cronjob are?
looks like something wrong with a path
try as example
#!/bin/bash
cd /(real path to jira home)/atlassian/jira
./bin/start-jira.sh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.