script running under shell has trouble with crond

From: Hekaton Keires (hekatonkeires_at_hotmail.com)
Date: 09/26/03


Date: Fri, 26 Sep 2003 11:48:28 +0200

hi all, need help; got a bash script that connects to a remote web server,
gathers some data, inserts them into a oracle server and logs every
activity in a local file.

this script, besides setting variables such as PATH and CLASSPATH
runs a java application which works without any problem if run in shell.

but once i try to make crond execute it periodically this script starts
itself, but never reaches the end of the job. sincerely java application
has no trouble in connecting to the web server and drain data, but once
it tries to make a select on oracle it just hangs up with no error reported,
as looking on a log file.

i've tried to change some environment variable, with no success. after all
if the java application executes the first steps why shouldn't it accomplish
the others? maybe it depends on CLASSPATH but it seems to be set
correctly with every reference mentioned as absolute, not relative...

pls help
________________________

salve gente, urge aiuto; ho uno script in bash che si connette a dei servers
web remoti, scarica dati, li inserisce su un server oracle remoto e logga
ogni attivita' in un file locale.

lo script, oltre ad impostare variabili come PATH e CLASSPATH lancia
un'applicazione java e funziona senza pecche se lanciato a mano sotto la
shell.

nel momento in cui delego crond di eseguire lo script giornalmente questo
parte, ma non conclude il job. in realta' l'applicazione java riesce senza
problemi a connettersi ai server remoti e scaricare dati, ma non appena
effettua il primo select sul server oracle si blocca (almeno stando ai files
di log) senza restituire alcun errore al crond.

ho provato a modificare l'ambiente di crond, ma non e' servito... d'altronde
se l'applicazione parte e riesce ad eseguire egregiamente le prime funzioni
come mai si dovrebbe impallare solo verso la fine? ho pensato che magari
questo dipende dalla locazione della classe invocata per le connessioni sql,
ma la CLASSPATH e' impostata in maniera corretta... ed ogni riferimento e'
sempre assoluto e mai relativo.

pls help.



Relevant Pages