You are here: Re: Running php file everyday on scheduled time « PHP Programming Language « IT news, forums, messages
Re: Running php file everyday on scheduled time

Posted by Krustov on 10/13/48 11:53

<comp.lang.php>
<bobmct>
<Fri, 21 Jul 2006 11:29:16 -0400>
<un6wg.8$5v3.696@news.ntplx.net>

> > Is there is way to run a php file perodically everyday on scheduled
> > time in such a way that there is no human interaction and it
> > performence the written task.
>
> I do this every night with several php scripts that DO things in an
> unattended mode.
>
> I make sure that I have the proper shebang (#!/usr/bin/php) as the first
> statement of my script, then I create a cron job to run at the specified
> time to execute the appropriate php script(s).
>
> Works like a charm.
>

www.emailuser.co.uk/popular.php

Not a cron job - but the first person to look at the webpage after
midnight will fire up the 'process loops' and then save the results so
they can just be read in anytime afterwards .

$junko=date("l dS of F Y h:i:s A"); $coke=substr($junko,0,5);

$filename="demo/day_popular.php";
$fp=fopen($filename,"r"); $qaz=fgets($fp); $pepsi=trim($qaz); fclose
($fp);

if ($coke<>$pepsi)
{

BLAH BLAH RUN THE LOOPS - AND SAVE THE RESULTS

$filename="demo/day_popular.php";
$fp=fopen($filename,"w"); fwrite ($fp,$coke); fwrite ($fp,"\n"); fclose
($fp);
}


--
Encrypted email address
www.emailuser.co.uk/?name=KRUSTOV
Make a shorter url
www.vhit.co.uk

 

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

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