Perl script works, but not through CRON

I have a perl script (which syncs delicious with wp) that:

  • executed through the shell but
  • doesn't start via cron (and I don't get an error message)

The only thing I can think of is that it does not read the configuration file correctly, but ... it is determined through the full path (I think).

I read my configuration file as:

my $config = Config::Simple->import_from('/home/12345/data/scripts/delicious/wpds.ini',
   \my %config);

(I accept on mediatemple)

Does anyone have a key?

update 1 : HERE - full code: http://plugins.svn.wordpress.org/wordpress-23-compatible-wordpress-delicious-daily-synchronization-script/trunk/ (but I added the path as indicated above to the file location configuration as a difference)

2: https://forums.mediatemple.net/viewtopic.php?pid=31563#p31563

3: ,

+2
6

cron , , "". , .. cron, , , cron - PATH, , , / WP ..

: cron, :

env > /home/27632/tmp/env.27632

, . , .

, cron /dev/null - .

+6

, perl, Config

:

perl -e "print @INC"

perl script cron

,

+4
+2

crontab, "perl". , , $PATH, cron. perl , perl cron.

$ type perl

+1

...

Perl script , CRON = > : "perl: command not found"

... Plesk 12.0 Plesk 12.5. .

, Odin, : https://talk.plesk.com/threads/scheduled-tasks-always-fail.331821/

:

/usr/local/psa/bin/server_pref -u -crontab-secure-shell ""

/var/spool/cron/crontabs :

SHELL="/opt/psa/bin/chrootsh"

After that, my cron jobs start with an error.

(Ubuntu 14.04 with Plesk 12.5)

0
source
 If the perl script runs fine manually, but not from crontab, then
 there is some environment path needed by the some package that is not
 getting through `cron`. Run your command as follows:
 suppose your cron entry like:

* 13 * * * /usr/bin/perl /home/username/public_html/cron.pl >/dev/null 2>&1

 env - /home/username/public_html/cron.pl

 The output will show you the missing package. export that package path in
 $PATH variables
-1
source

All Articles