Cron issue

vps

#1

i’ll do my best to explain my problem as good as possible:

i have a php script that updates a mysql database.
i use cron to run that script every minute

          • lynx http://www…php
            the cron runs from what i can tell from the emails i get but the database doesn’t get updated every time the script runs, and it should.

from what i can tell the db get updated ~ every 10 minutes.

this is the emails i get

[quote]Your Terminal type is unknown!

Enter a terminal type: [vt100]
TERMINAL TYPE IS SET TO vt100
(B )0 [1;24r [m [?7h [?1h = [H [J [21B [0;7m Getting http://l…php [m
[0;7m Looking up l.com [m [22;27H
[0;7m Making HTTP connection to l…com [m
[0;7m Sending HTTP request. [m [22;22H
[0;7m HTTP request sent; waiting for response. [m

[24;1H
[?1l >
[/quote]

do you have any idea what could be wrong?

your help is appreciated! Thanks


#2

i think i got it!

if i run the script through lynx the page gets timed out and that’s why i can’t get it to work every time. (still don’t know why this is).
running it with php /absolute path works like a charm.


#3

Lynx is a text-based web browser — it’s designed to be used interactively in a terminal window, and it’ll prompt you for input in some circumstances. It is the wrong tool for the job.

Instead, use wget or curl to load web pages in cron jobs.