in reply to Re: Having a problem with my path
in thread Having a problem with my path

As mentioned in my original question, I have written a perl script that does a number of things (in perl), however, some of the things it does is calls out to some third-party shell scripts (mkvdts2ac3) which also calls another third-party script (mvkmerge) to do various things. When calling these other scripts is where the path seems to get lost if calling through cron. I've tried specifying in cron, in the scripts themselves, but since these are third party scripts, I was hoping to not to have to modify them directly. It sounds like that's probably my only option at this point.

I just wanted to see how other have gotten around similar situations.

Thanks

Replies are listed 'Best First'.
Re^3: Having a problem with my path
by astroboy (Chaplain) on Nov 13, 2013 at 00:52 UTC

    This is not an uncommon issue. The solution I use is to set the environment prior to calling the script I want ot run

    30 01 * * * * . /path/to/myenv.env; /path/to/myscript
      Thank you for clarifying. :)
      I tried to say that above:
      "Hard to fully diagnose without also seeing the actual cron. If you use a fully qualified path from the cron to mkvdts2ac3, when calling it, and use an absolute path to mkvmerge, when calling it from mkvdts2ac3. There should really be no problems."

      --Chris

      #!/usr/bin/perl -Tw
      use Perl::Always or die;
      my $perl_version = (5.12.5);
      print $perl_version;