Cron job wont work


#1

Hi
I’ve been working on this for a full day… can’t figure it out. I’m new to cron job and have only a basic understanding of php. The following works from a broswer but not cron job:
https://site.com/file.php?var1=item1&var2=item2&var3=item3

I’ve tried the following cron jobs amongst others, but to no avail… what am I doing wrong?

cd /home/user/site.com/; /usr/local/php5/bin/php home/user/site.com/file.php item1 item2 item3; $var1=$argv[1]; $var2=$argv[2]; $var3=$argv[3];


#2

Full paths and quotes often help.

For the first one, try /usr/bin/links and put that long URL in single ’ or double " quotes

For the second one, add a leading slash to /home/user/…
Also for the second one, I’m not sure what your variables really are or they’ll even get passed to your cron job.


#3

Thanks it worked! I can’t believe I forgot about quotes.
(the first and second were supposed to be analogous codes, but I was sketchy on the second one).
Thanks!