Hi,
I have a java application which parses some data from the BBC News website and inserts in into a database for my final year project. The application works fine, however I need to make this run automatically at set intervals so I've setup a crontab on one of the universitys UNIX servers to run the java app automatically 4 times throughout the day.
The command I need to run is,
I've setup the crontab to run this command 4 times a day; which it does... however for the java app to run correctly it requires the additional -D parameter (in bold above). However, when the crontab runs it doesn't seem to take account of the -D parameter; however when I run the command at the shell it works fine
.
The cron job output has lots of...
SAX Exception: SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found
Anyone got any ideas on how to fix this? Is it possible to put the java command within a shell script (although I don't know anything about this), then execute that?
Thanks,
Alex
I have a java application which parses some data from the BBC News website and inserts in into a database for my final year project. The application works fine, however I need to make this run automatically at set intervals so I've setup a crontab on one of the universitys UNIX servers to run the java app automatically 4 times throughout the day.
The command I need to run is,
Code:
java -jar [B]-Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl[/B] /home/hudson/ug/d53s9b/project/rss2sql.jar
I've setup the crontab to run this command 4 times a day; which it does... however for the java app to run correctly it requires the additional -D parameter (in bold above). However, when the crontab runs it doesn't seem to take account of the -D parameter; however when I run the command at the shell it works fine

The cron job output has lots of...
SAX Exception: SAX2 driver class org.apache.crimson.parser.XMLReaderImpl not found
Anyone got any ideas on how to fix this? Is it possible to put the java command within a shell script (although I don't know anything about this), then execute that?
Thanks,
Alex