I need to create a cron job where I only have shell access. I know how to do it with cPanel, but this is on 1and1 server so I must use shell.
I got to the part where I add a new cron job in the crontab as per 1and1 FAQ, but I’m not sure what I’m doing wrong because the cron job isn’t running at all.
This is what I’d normally put in cPanel:
0 8 * * 1 wget 'http://my_www_domain/googlefroogle.php?feed=fy_uy_tp&key=XXXXX3f7d1'
This is what I have in my crontab now:
0 8 * * 1 /usr/local/bin/php /homepages/XX/XXXXXXX/htdocs/googlefroogle.php?feed=fy_uy_tp&key=XXXXX3f7d1
What am I missing or doing wrong? BTW, if I manually enter the URL in my browser, everything works fine so I’m sure the script is OK.
None of these answers helped me do what I need so I ended up using the following php file which was called by the crontab:
In case anyone else needs something similar… Also, note that this requires php5, the http_build_query doesn’t work on php4