Rudi Ahlers wrote:
On Wed, Oct 1, 2008 at 7:06 AM, Les Mikesell lesmikesell@gmail.com wrote:
Rudi Ahlers wrote:
On Wed, Oct 1, 2008 at 12:37 AM, Filipe Brandenburger filbranden@gmail.com wrote:
Hi,
On Tue, Sep 30, 2008 at 16:30, Rudi Ahlers rudiahlers@gmail.com wrote:
I simply need to call 2 php scripts via a website - very simple todo, but cron tends to give me these errors for some odd reason, and the scripts doesn't run on the remote website.
How are you calling these scripts from cron? lynx? wget? curl? Maybe the problem is with the tool you are using to do that. If you give us more details, we might be able to help you better.
HTH, Filipe _______________________________________________
Hi, yes sorry I should have added that :)
I'm using lynx, as follows:
9 0 * * * /usr/bin/lynx http://billing/admin/cron.php */5 * * * * /usr/bin/lynx http://billing/pipe/pop.php
Lynx wants to do cursor positioning which is fairly useless in non-interactive mode. You can give it a terminal type on the command line with the -term= option, but it would probably be better to use wget instead for non-interactive work.
wget downloads the whole page every time, which wastes bandwidth & HDD space. Apart from using the "> /dev/null" option, is there any other way to use it?
Lynx is going to send the page to stdout, which cron will collect and email to you unless you have redirected to /dev/null also, so I don't see a big difference there. For static pages wget can use -N to only get copies after they change, and the -O option to control where it goes, which could be /dev/null if you really never want to see it.
And with lynx, do I just issue lynx -term=vt100 http://billing/admin/cron.php ?
Yes, but I'd recommend doing 'man lynx', 'man wget', and 'man curl' so you understand the options and features of each.