A little background, I have a perl script that does a number of things, but one of them is it calls some system commands and one of those commands calls other system commands. (I call mkvdts2ac3, it calls mkvmerge) This is all running out of a cronjob under my user. When I run the script as my user, everything works fine. When I let the script run under the cronjob, it fails saying mkvmerge is not in my path.

I don't think this is really a perl problem, but rather a system (in general, how unix systems env variable are set) kind of problem.

What I'm wondering, is, has anyone run in to a similar problem and how have you solved it?

I've got PATH=/blah/blah/blah:/more/blah:/and/more set in my crontab, still no luck. Just wondering if anyone has any other ideas. In the meantime, I've edited the mkvdts2ac3 script to fully specify the mkvmerge path instead of just calling it from the system path. This isn't a long term solution I like, but works for now.

Thanks

In reply to Having a problem with my path by calebcall

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.