NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: RUN SHELL SCRIPT IN CRON
by lakshmananindia (Chaplain) on Mar 25, 2009 at 05:28 UTC

    Please use <code> tags first

    --Lakshmanan G.

    Your Attempt May Fail, But Never Fail To Make An Attempt

Re: RUN SHELL SCRIPT IN CRON
by bichonfrise74 (Vicar) on Mar 25, 2009 at 07:04 UTC
    Hmm... you've already posted the same message -- id = 752798
    And you were told to use code tags.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: RUN SHELL SCRIPT IN CRON
by CountZero (Bishop) on Mar 25, 2009 at 06:36 UTC
    Most probably an issue with file permissions. The cron job will run as a different user with different permissions and may perhaps have no run-access to your perl script.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: RUN SHELL SCRIPT IN CRON
by sathiya.sw (Monk) on Mar 25, 2009 at 08:31 UTC
    hmmm, probably use ./script1.pl inside the shell script instead of just script1.pl

    does it helped ?
    -- Sathiyamoorthy

      More generally, this is something I've seen happen way too many times: shell scripts that "work fine" from the command line but fail under cron due to cron having a different PATH.

      My hunch is the OP has '.' somewhere in his PATH.