T
Test Engineer
Guest
I'm fairly new to Linux and can't figure out why my perl backup script runs at the command line but not when using CRON. Here are the specifics:
CentOS 6.5 minimal using /bin/bash, perl script resides in /usr/bin/backup.pl, cron file I'm testing is 10 * * * * /usr/bin/backup.pl, permissions on perl script set to 750, cron log file shows execution, mailto shows execution but the backup files never show up. If I run the perl script (logged in as root), it will execute if I'm in the /usr/bin/ directory and it does create the backup files. Additional info provided as you ask. Thanks!
CentOS 6.5 minimal using /bin/bash, perl script resides in /usr/bin/backup.pl, cron file I'm testing is 10 * * * * /usr/bin/backup.pl, permissions on perl script set to 750, cron log file shows execution, mailto shows execution but the backup files never show up. If I run the perl script (logged in as root), it will execute if I'm in the /usr/bin/ directory and it does create the backup files. Additional info provided as you ask. Thanks!