0

I know this might be extremely vague, but not sure why this would be the case, and hope someone might be able to shed some light on this for me.

I have a custom script that access Gmail Contacts (authorized), and it syncs the contacts with Gmail, and my custom CRM.

When I run the script in my browser, everything works great, no problems. When I run my CRON job on the 'script', the script isn't able to login to the account and make the sync run properly.

Do you have any idea why this might be so different between the CRON and my Browser visit?

Justin
  • 2,502
  • 7
  • 42
  • 77
  • What sort of technology are you using? What programming language is your script written in? – Greg Hewgill Nov 21 '12 at 21:09
  • 1
    99% of the time, when you have a cron job that's acting oddly, it's an environment issue. Try using the full path to your script and any executables it accesses (ie not wget, but /usr/bin/wget). Look through your script and check for environment variables that need to be set. – Irongaze.com Nov 21 '12 at 21:19
  • @GregHewgill, I wrote it in PHP. The server is on Linux (CentOS), hosted at LiquidWeb. – Justin Nov 21 '12 at 21:26
  • Ok, are you running your PHP script directly from cron, or are you using something like curl to make your web server do it? – Greg Hewgill Nov 21 '12 at 21:42
  • Sorry, yes, I CURL a [url], and it does the rest. – Justin Nov 21 '12 at 21:43

0 Answers0