Cannot get Script to Run Via Crontab

David Goodnature goodnaturenet at
Sun Dec 16 11:22:33 PST 2007

I have a perl script that I can execute from the command line as root.  It runs fine.
When I try to automate it using the root crontab, the script fails.

The lines from my script that are causing the problem are:

   my $scomd = "/usr/local/bin/ps2pdf -dPDFSETTINGS=/prepress -dProcessColorModel=/DeviceGray -dAutoRotatePages=/PageByPage -dDownsampleMonoImages=true -dMonoImageDownsampleType=/Average -dMonoImageDownsampleThreshold=1.5 -dMonoImageResolution=600 ".$inpath.$cur_ps_files[0]." ".$outpath.$pdffilename;

   ### create the new .pdf file from the .ps file
   system($scomd) == 0 or return "system $scomd failed: $?";

The cron message to mail/root ends with:

   exec: ps2pdf12: not found

I am assuming that cron cannot find a path or a config file for ghostscript, but I don't have any idea how to fix this problem.

Any help would be appreciated.

Get the power of Windows + Web with the new Windows Live.

More information about the freebsd-questions mailing list