Re: how to set term environment for cronjobs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Oct 1, 2008 at 2:55 PM, Les Mikesell <lesmikesell@xxxxxxxxx> wrote:
> Rudi Ahlers wrote:
>>
>> On Wed, Oct 1, 2008 at 7:06 AM, Les Mikesell <lesmikesell@xxxxxxxxx>
>> wrote:
>>>
>>> Rudi Ahlers wrote:
>>>>
>>>> On Wed, Oct 1, 2008 at 12:37 AM, Filipe Brandenburger
>>>> <filbranden@xxxxxxxxx> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> On Tue, Sep 30, 2008 at 16:30, Rudi Ahlers <rudiahlers@xxxxxxxxx>
>>>>> 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.
>
> --
>  Les Mikesell
>   lesmikesell@xxxxxxxxx
>
>
>

I got lynx to work with the --dump option, and now the errors are
gone, and the cronjob works well. wget downloaded the whole website
which was like 23MB everytime, whereas lynx gave me the output, which
is more usable for trouble shooting the cronjob.

Thanx for all your help



-- 

Kind Regards
Rudi Ahlers
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux