I have a perl script (part of the XMLTV family of "grabbers" in particular tv_grab_oztivo).
I can successfully run it as follows:
/sw/bin/perl /path/to/tv_grab_oztivo
I use full paths to everything to fix working directory problems. Permissions should not be a problem.
So, if I run it from the terminal (Mac OSX), it works fine.
But when I set it to run through cron, nothing happens at all. No output is created, etc.
There is nothing wrong with crontab as far as I can see, because if I substitute helloworld.pl for the actual script, it works fine at the right time.
So what can I do for debugging? I can see, looking at %ENVin two cases, when the environment is very different, but what other approaches can I take for debugging? How can I see the result of the cron job, which may be some kind of perl "dying" message or a "not found" message from the shell or something else?
Or should I try to somehow give the cron version of the command in the same environment as when working with it?
source
share