Perl script works but not via CRON -
i have perl script (which syncs delicious wp) which:
- runs via shell
- does not run via cron (and dont error)
the thing can think of read config file wrongly but... defined via full path (i think).
i read config file as:
my $config = config::simple->import_from('/home/12345/data/scripts/delicious/wpds.ini', \my %config); (i hosted on mediatemple)
does have clue?
update 1: here complete code: http://plugins.svn.wordpress.org/wordpress-23-compatible-wordpress-delicious-daily-synchronization-script/trunk/ (but have added path above configuration file location difference)
update 2: crossposted on https://forums.mediatemple.net/viewtopic.php?pid=31563#p31563
update 3: full path did trick, solved
the difference between cron job , job run shell 'environment'. primary difference profile , not run cron job, environment variables have set in normal shell environment not set same in cron environment - no extensions path, no environment variables identifying delicious and/or wp hosted, etc.
suggestion: create cron job reports environment known file:
env > /home/27632/tmp/env.27632 then see set in own shell environment in comparison. chances are, reveal trouble.
failing that, other environmental differences cron job has no terminal, , has /dev/null input , output - interactive stuff not work well.
Comments
Post a Comment