I've figured it out. You can't have the java call directly in the crontab.
You need to write a shell script that brings in the proper environmental
variables and sets the PATH, and then that script makes the java call.
Mine looks like this:
SHELL=/bin/bash
export JAVA_HOME=/usr/home/dspace/app/java
export ANT_HOME=/usr/home/dspace/app/ant
export MAVEN_HOME=/usr/home/dspace/app/maven
export CATALINA_HOME=/usr/home/dspace/app/tomcat
export DSPACE_HOME=/usr/home/dspace/app/dspace
export LD_LIBRARY_PATH=/usr/home/dspace/app/sqlplus
export TNS_ADMIN=/usr/home/dspace/app/sqlplus
export JAVA_OPTS="-Xmx2024M -Xms2024M -Dfile.encoding=UTF-8"
PATH=.:$JAVA_HOME/bin:$ANT_HOME/bin:$MAVEN_HOME/bin:$CATALINA_HOME/bin:$PATH:/usr/home/dspace/app/sqlplus
PATH=$PATH:$DSPACE_HOME/bin
/bin/date >> /tmp/mediafilter.log
/usr/home/dspace/app/dspace/bin/filter-media -v >> /tmp/mediafilter.log
It would be good to address this in the documentation
(http://www.dspace.org/index.php?option=com_content&task=view&id=152 --
see "cron jobs")
_____________________
Tom McGee
Seton Hall University TLTC
973.275.2992
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech