I have a problem of not getting a perl script to run via cron.
The scripts fetches a few files from an ftp and put em in a datbase and finished of with:
system("date >> runlog.txt"); which puts current date in the runlog.txt file.
If I run the script manually all is fine. I can run it from any place i.e from any folder.
So /home/one2superuser/SALESINFO/doAll.pl command will update the db and write to
/home/one2superuser/SALESINFO/runlog.txt
the doAll.pl script calls 4 other perl files all in the listet direcotory.
here are the file permissions:
one2superuser@northstar:~/SALESINFO$ ls -lla
total 592
drwxr-xr-x 4 one2superuser one2superuser 4096 2007-06-28 01:45 .
drwxr-xr-x 17 one2superuser one2superuser 4096 2007-07-10 03:10 ..
drwxr-xr-x 2 one2superuser one2superuser 12288 2007-07-10 06:15 CNF
-rwxr-xr-x 1 one2superuser one2superuser 6930 2007-06-09 01:20 codesformatter.pl
-rwxr-xr-- 1 one2superuser one2superuser 1047 2007-06-26 23:42 doAll.pl
drwxr-xr-x 2 one2superuser one2superuser 4096 2007-07-09 10:32 EXP
-rwxr-xr-x 1 one2superuser one2superuser 156 2007-06-03 16:44 myfirstphp.php
-rw-r--r-- 1 one2superuser one2superuser 535188 2007-05-11 21:59 o2t_MERCHANTSALES_CNF.sql
-rwxr-xr-x 1 one2superuser one2superuser 1901 2007-06-09 02:06 perlftpCNF.pl
-rwxr-xr-x 1 one2superuser one2superuser 1853 2007-06-09 02:06 perlftpEXP.pl
-rw-rw-rw- 1 one2superuser one2superuser 424 2007-07-09 10:33 runlog.txt
-rwxr-xr-x 1 one2superuser one2superuser 2197 2007-06-09 01:20 salesimportCNF.pl
-rwxr-xr-x 1 one2superuser one2superuser 2197 2007-06-09 01:20 salesimportEXP.pl
-rwxr-xr-x 1 one2superuser one2superuser 1835 2007-06-09 01:20 salesimport.pl
Crontab listing.
one2superuser@northstar:~/SALESINFO$ crontab -l
# m h dom mon dow command
00,15,30,45 6,14,15 * * * /home/one2superuser/SALESINFO/doAll.pl
But the file runlog.txt is never updated from cron, only when i run the script manually????
I would really appreaciate help for this seamingly small problem, but i cant figure it out.
I even tried running it as root user using sudo crontab -e
But still it doesnt run.
Help