From: anna h. <an...@gm...> - 2011-09-06 13:43:07
|
Hi Markus, I have a similar setup and I start my script with: #!/bin/bash -l Anna On Tue, Sep 6, 2011 at 09:34, Demian Katz <dem...@vi...> wrote: > Does it help if you explicitly run: > > source /etc/profile > > at the top of your cron script to reload the profile? > > - Demian > > > -----Original Message----- > > From: Markus Fischer [mailto:in...@fl...] > > Sent: Tuesday, September 06, 2011 9:30 AM > > To: vuf...@li... > > Subject: Re: [VuFind-Tech] Cron for importing data > > > > I tried all three inputs: > > > > Tuans: cp -f and . /home/vufind/.profile > > > > (I found no .bash_profile only .profile) > > > > and from Demian: > > > > ./import-marc.sh /home/vufind/vufind-data/export/cronExport-rdlf.mrc > > > import_rdlf.log > > > > which gives > > > > "You need to set the VUFIND_HOME environmental variable before running > > this script." > > > > echo $VUFIND_HOME shows me /usr/local/vufind > > > > I also have in /etc/profile at the end of the file for all users > > > > export VUFIND_HOME="/usr/local/vufind" > > > > Markus > > > > Am 06.09.2011 14:48, schrieb Demian Katz: > > > Have you tried redirecting the output of import-marc.sh to a log file > > to see if you can capture any error messages when the process fails? > > On a similar note, it might also be worth echoing status messages to a > > log to see where/whether execution stops. > > > > > > - Demian > > > > > >> -----Original Message----- > > >> From: Markus Fischer [mailto:in...@fl...] > > >> Sent: Tuesday, September 06, 2011 8:14 AM > > >> To: vuf...@li... > > >> Subject: [VuFind-Tech] Cron for importing data > > >> > > >> I am stuck on automating the import process. > > >> > > >> I have got a script that works when invoked manually as vufind user. > > >> But > > >> when used by cron (again as vufind user) will never complete... > > >> > > >> ...I tried different path options and ways to invoke the scripts. > > >> > > >> Thanks for any pointers! > > >> > > >> Markus > > >> > > >> Vufind 1.1 > > >> > > >> 14 21 * * 1-7 /usr/local/vufind/import_cron.sh > > >> > > >> #!/bin/bash > > >> # import_cron.sh > > >> > > >> # abort on error > > >> set -e > > >> > > >> # Disable JETTY_CONSOLE output > > >> export JETTY_CONSOLE=/dev/null > > >> > > >> # function to change shell and subshells to vufind directory > > >> vhome () { > > >> cd /usr/local/vufind > > >> } > > >> > > >> # Change to vufind directory > > >> vhome > > >> pwd > > >> > > >> # Get marc.properties for each data set and import data > > >> cp import/marc.properties-rdlf import/marc.properties > > >> ./import-marc.sh /home/vufind/vufind-data/export/cronExport-rdlf.mrc > > >> > > >> #[several imports in this manner, but with cron, will never see any > > of > > >> these finished...] > > >> > > >> echo "all imports completed successful!" > > >> > > >> # restart Vufind > > >> ./vufind_cron.sh restart > > >> > > >> -------------------------------------------------------------------- > > --- > > >> ------- > > >> Special Offer -- Download ArcSight Logger for FREE! > > >> Finally, a world-class log management solution at an even better > > >> price-free! And you'll get a free "Love Thy Logs" t-shirt when you > > >> download Logger. Secure your free ArcSight Logger TODAY! > > >> http://p.sf.net/sfu/arcsisghtdev2dev > > >> _______________________________________________ > > >> Vufind-tech mailing list > > >> Vuf...@li... > > >> https://lists.sourceforge.net/lists/listinfo/vufind-tech > > > > ----------------------------------------------------------------------- > > ------- > > Special Offer -- Download ArcSight Logger for FREE! > > Finally, a world-class log management solution at an even better > > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > > download Logger. Secure your free ArcSight Logger TODAY! > > http://p.sf.net/sfu/arcsisghtdev2dev > > _______________________________________________ > > Vufind-tech mailing list > > Vuf...@li... > > https://lists.sourceforge.net/lists/listinfo/vufind-tech > > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > Vufind-tech mailing list > Vuf...@li... > https://lists.sourceforge.net/lists/listinfo/vufind-tech > |