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

can anyone let me some wisdom as to where to start with this? i have a perl script that finds filenames, in a directory, then calls a URL to get some custom meta data, then uses the system command to call exiftool and the url string with filename to add metadata to the file it called earlier. the script works fine when i run it from terminal, but when i set up the cron it just doesn't seem to work. i feel like its getting caught at system ("exiftool $variables_from_URL); anyone know where to begin to diagnose? my cron also looks like this #*/2 * * * * /usr/bin/perl /Volumes/.../exiftool.pl thank you

Replies are listed 'Best First'.
Re: Perl Script works when i run in terminal, not via cron
by tybalt89 (Monsignor) on Apr 02, 2019 at 01:33 UTC

    Usually because the $PATH is different under cron. Try using full path names in the system call.

      actually that did it, thank you so much!
      like /usr/local/bin/exiftool?
Re: Perl Script works when i run in terminal, not via cron
by ig (Vicar) on Apr 02, 2019 at 01:59 UTC