in reply to System call from cron Perl script

$ENV{PATH} is probably not "right" for the cron job.

/etc/profile (or whatever else the shell sources upon login) probably adds the path to mysqlimport to your PATH, and cron and its children don't run login shells.

Try adding $ENV{PATH} .= ':/path/to/mysql/bin' to your script.

Replies are listed 'Best First'.
Re^2: System call from cron Perl script
by duff (Parson) on Aug 26, 2005 at 03:38 UTC

    An excellent suggestion.

    Another way to accomplish much the same thing is to set the path in the crontab entry itself. You can add a line like the following:

    PATH=/bin:/usr/bin:/usr/local/bin:/path/to/mysql/bin
    somewhere near the beginning of the crontab entry to explicitly set the path for the processes that cron runs.