You are here: Re: php and cron « PHP Programming Language « IT news, forums, messages
Re: php and cron

Posted by Colin McKinnon on 09/07/06 22:15

Francois Bonzon wrote:

> On 2006-09-07 14:32:49 +0200, "giangiammy" <giangiammy@gmail.com> said:
>
>> I don't know if this is possible, but I need to accomplish an action
>> at a given hour (what cron does): is it possible to do something like
>> this having a web hosting service with php support?
>
> Yes, if you are able to set cron jobs on your web server. Save your
> script in a PHP file like
>
>
> #!/usr/bin/php
> <?php
>
> // Your code here
>
> ?>
>

....this will only work if you happen to have the CLI PHP in /usr/bin/php and
have permissions to run it. If not, but assuming you have shell access, you
could try accessing a URL using wget or curl.

If you don't have access to cron (or at) you could still write a daemon
process that wakes up at intervals to do its stuff - see sleep().

HTH

C.

 

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

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