Reply to Re: [PHP] Running a PHP script everyday

Your name:

Reply:


Posted by James Kaufman on 07/30/05 20:07

On Sat, Jul 30, 2005 at 09:17:20AM -0700, sub@pudlz.com wrote:
> I have a PHP script that I need to run once a day. I have it currently
> setup so that I just run it from my cell phone, but I would prefer something
> automated. I'd looked into a cron job, but that just looks like it's for
> doing linux command line stuff on my host.
>
> I also thought about writing a never ending while loop with an if statement
> that checks to see if it's time to run the script, then when it is time, it
> runs. Then checks to see if it's time again.
>
> But even assuming I could get it working, do I really want to have a PHP
> script that runs all the time. This could be bad if it ate up all the CPU on
> my server. I'm not even sure I have access rights to kill the process once I
> start it.
>
> Any suggestions?
>
> Andrew Darrow
> Kronos1 Productions
> www.pudlz.com
>

You don't state what OS you are using, but you certainly can use cron under
Linux to run a PHP script. What really matters is what does the PHP script do?
For example, I have a PHP script that I run periodically that retrieves data
from a database and updates a text file on the disk. What does your script do?

--
Jim Kaufman
Linux Evangelist
public key 0x6D802619
CCNA, CISSP# 65668

[Back to original 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

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