jasemilly Posted June 6, 2017 Share Posted June 6, 2017 Hi I can backup the repo from the command when in the buildomatic folder like with this commandjs-export.sh --everything --output-zip jas1.zip all works great, when I try to create a cron job nothing happens can anyone shed any light please??? 40 15 * * * /home/jason/jasperreports-server-cp-6.3.0-bin/buildomatic/js-export.sh --everything --output-zip jas1.zip I have put a log on the cron job the result it is returning isINFO: No bundled ant found (../apache-ant or ../../apache-ant). Using existing antBuildfile: build.xml does not exist!Build failed[/code] I am more confused as CRON is firing why would is say BUILD.XML doesn't exist when I can copy the command into buildomatic folder and run it perfectly fine? thanks Link to comment Share on other sites More sharing options...
elizam Posted June 6, 2017 Share Posted June 6, 2017 Have you tried creating a simple script and then having the cron job run the script? For example:cd /home/jason/jasperreports-server-cp-6.3.0-bin/buildomatic/../js-export.sh --everything --output-zip jas1.zip My guess is that the js-export.sh script is using a local path for the build.xml command and when you run the script from the default cron location, it doesn't find build.xml. Link to comment Share on other sites More sharing options...
hozawa Posted June 7, 2017 Share Posted June 7, 2017 Which user are you running the cron? It's likely that the cron is running under root or some other user and the home directory is different. Link to comment Share on other sites More sharing options...
jasemilly Posted June 7, 2017 Author Share Posted June 7, 2017 Hi Elizam I had that vey thought this morning and thought would be succesful. I created a simple script in buildomatic folder that call js-export with arguments. executed it in the terminal all worked perfectly. I changed the cron job to run this script. It ececutes my script but still has build.xml issue.so this must be some form of permission Link to comment Share on other sites More sharing options...
jasemilly Posted June 7, 2017 Author Share Posted June 7, 2017 hozawa I am presuming root, I will look at how to change that. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now