Difference between manual run and crontab run?
My predecessor wrote a perl file that is run manually twice a month to send a set of emailed reports to one of our clients. My boss has requested that I look into automating this; it seemed simple enough, and I thought I had it set up, but I'm running into a rather strange problem.
Both the emailing program (in perl) and the report files themselves are kept on a Novell server reached from our Linux box via /mnt/srv/path/to/file/. From the linux box, I can see and manipulate them fine. The files are displayed as having 755 permissions across the board. The Linux box itself is running SuSE 9.3.
A manual run of the emailing program works fine; the files are sent out as expected. However, when I tried to set up a crontab entry for this, I'm running into trouble. I manually edited /etc/crontab to include a line setting the program to run at '0 21 * * 1,2,3,4,5'. The program itself runs fine, but errors out every time it tries to attach a file; the error message is one that various perl sites indicate means 'could not read the path to this file'.
What's the difference between a cron run and a manual run? What are some possible reasons the former fails and the latter works?
|