You are here: Re: daily automated query of database « PHP Programming Language « IT news, forums, messages
Re: daily automated query of database

Posted by Apostolos P. Tsompanopoulos on 10/08/36 11:24

On Πεμ, 18 Αύγ 2005 at 12:25 GMT, braders00 wrote:
> I would like to run a script on a daily basis that queries a DATE field
> in one of my tables. I want to do this to establish the age of my table
> entry by comparing with the current date.
>
> Could someone please give me a few pointers on how to get started in
> solving this. I just read somewhere about cron jobs but I've never used
> them?
>
> I'm running Apache (2.0.54) on Win XP Prof with MySQL (4.1.10) and PHP
> (4.3.10). All on a local machine so I can set all appropiate
> permissions.

At first try calling your script from a DOS window using php.exe
For example [1]:
c:\tmp> php -f myscript.php

and check the output. If it's OK, create a repeating job with
any job scheduler (like nnCron Lite [2]) and set the output
to be emailed to your account.

Cron is just a service which enables a user to create jobs
that repeat as scheduled.

Apostolos


[1] Since I'm using only Unix systems, I don't know the exact
syntax of the command in DOS/Windows. Try "php --help" or
"php -h" to see how you can call a script from command
line.

[2] http://www.freewareweb.com/cgi-bin/archive.cgi?ID=1651

--
Replace earth.space with gmail.com for a valid e-mail

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация