OS - Ubuntu Linux. I have a script which executes gmail-backup.sh and appends the storage location for the emails and the login details to the command. It works perfectly from the Terminal. All emails are downloaded and the permissions are correctly set so I am owner. When I set up a cron job to execute the script, only 40-50 emails are downloaded and theses are owned by root. The emails in the gmail account are from Jan 2010 to the present. Only emails between Jan and Mar 2010 are being downloaded. I tried adding a "date after" 20100401 to the line and did receive more emails from April and May but not all of them. I tried adding a "date after" and a "date before" 20090101 20110101 to the line but still didn't receive all the emails. I ran the script on another gmail account and obtained similar results. Somewhere between 40 and 50 emails are being downloaded at a time. The number is always different but within this range. I infer from this the script is timing out for some reason. Why does the script work fine from Terminal but not from cron? |
|||