469,282 Members | 1,977 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

Running php file everyday on scheduled time

Hi,
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.

Jul 21 '06 #1
7 4215
Rik
sachu wrote:
Hi,
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.
Usually that's done using a cronjob on the server.

Grtz,
--
Rik Wasmus
Jul 21 '06 #2
I'm also having this issue on Windows server

Any ideas?

"sachu" <sa*********@gmail.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
Hi,
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.

Jul 21 '06 #3
sachu wrote:
Hi,
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.

Bob
Jul 21 '06 #4
<comp.lang.php>
<bobmct>
<Fri, 21 Jul 2006 11:29:16 -0400>
<un*************@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
Jul 21 '06 #5
Veco wrote:
I'm also having this issue on Windows server

Any ideas?

"sachu" <sa*********@gmail.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
>>Hi,
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.


In Windows you use Scheduled Tasks.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 21 '06 #6
Can someone tell me the steps require to sheduele a php file...
This particular file checks the remote database for data modification
and update the same in the local database.This is periodic check and
has to be done in daily basis.
How can i schedule. please let me know in detail as am a newbie to this
php world.
Iam Using PHP5.0 Mysql and IIS.

Jul 22 '06 #7
sachu wrote:
Can someone tell me the steps require to sheduele a php file...
This particular file checks the remote database for data modification
and update the same in the local database.This is periodic check and
has to be done in daily basis.
How can i schedule. please let me know in detail as am a newbie to this
php world.
Iam Using PHP5.0 Mysql and IIS.
Scheduling the file is a Windows (or other OS) task. Check with your
Windows Administrator or search Microsoft for "Scheduled Task".

The executable will be your php.exe file with the parameter being your
script.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 22 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by pri10der | last post: by
6 posts views Thread by Dirk Reske | last post: by
1 post views Thread by Michael Groeger | last post: by
2 posts views Thread by mscurto | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.