Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Twig in a crontab?

by BenHopkins (Sexton)
on Jan 31, 2008 at 07:31 UTC ( [id://665299]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://665299]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-19 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found