First, I:
sudo crontab -e -u adrian
Then I add:
* * * * * cd /home/adrian/app/; perl -I /home/adrian/app/lib/ script/db/log_to_db.pl
This should make the script run every minute. This script modifies the database with new data. So I check my database every minute. No data. The "last update" time column doesn't change either. I check the log. Every minute this log appears:
Jul 9 13:32:01 dev1 CROND[28658]: (adrian) CMD (cd /home/adrian/app/; perl -I /home/adrian/app/lib/ script/db/log_to_db.pl)
Which looks like a succesful log. But the database doesn't change so the script is not running. Furthermore, if I execute the line on my command line manually:
cd /home/adrian/app/; perl -I /home/adrian/app/lib/ script/db/log_to_db.pl
The database changes and the script runs without problem! What am I doing wrong here?