in reply to Re^2: Twig in a crontab?
in thread Twig in a crontab?

Just FYI, this is what made it work. I ran a shell script from the cron. It looks like this:

#!/bin/sh LD_LIBRARY_PATH=/usr/sfw/lib export LD_LIBRARY_PATH chdir $HOME/bin ./test.pl

Maybe if I put the export command in the crontab line it would have worked, but it gets real messy when you jam too much stuff in the crontab file.

Replies are listed 'Best First'.
Re^4: Twig in a crontab?
by Fletch (Bishop) on Jan 31, 2008 at 13:52 UTC

    Bourne-ish shell syntax lets you set an environment variable for a single command by prefixing the command with VAR=value, so this command line would probably work if you wanted to do it in-place in the crontab:

    sh -c 'cd $HOME/bin ; LD_LIBRARY_PATH=/usr/sfw/lib ./test.pl'

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.