By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,925 Members | 732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,925 IT Pros & Developers. It's quick & easy.

Run a PHP script in background of a Site in every 10 Seconds

P: n/a
I need to run a script in every 10 seconds in background of the site
of 10-15 php pages.
So how do i activate that script?
Is there a code to be embedded in every php page so that the script
got run after every 10 seconds.

I need not to monitor that script.
This script will make some comparisions and then make changes in the
database.
Please reply as this is very neccesary for completion of my project.

Regards
Rahi Jain
Feb 17 '08 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On Feb 17, 3:29 pm, "rahismail...@gmail.com" <rahismail...@gmail.com>
wrote:
I need to run a script in every 10 seconds in background of the site
of 10-15 php pages.
So how do i activate that script?
Is there a code to be embedded in every php page so that the script
got run after every 10 seconds.

I need not to monitor that script.
This script will make some comparisions and then make changes in the
database.
Please reply as this is very neccesary for completion of my project.

Regards
Rahi Jain
its not about php use this html code -<meta http-equiv='refresh'
content='10'>
Feb 18 '08 #2

P: n/a
On Feb 18, 3:43 pm, Betikci Boris <pard...@gmail.comwrote:
On Feb 17, 3:29 pm, "rahismail...@gmail.com" <rahismail...@gmail.com>
wrote:
I need to run a script in every 10 seconds in background of the site
of 10-15 php pages.
So how do i activate that script?
Is there a code to be embedded in every php page so that the script
got run after every 10 seconds.
I need not to monitor that script.
This script will make some comparisions and then make changes in the
database.
Please reply as this is very neccesary for completion of my project.
Regards
Rahi Jain

its not about php use this html code -<meta http-equiv='refresh'
content='10'>
I think it will work but i need script to be run in back ground.
This way i have to keep that page open all the time during the trading
hours ( Privately on one node).
if any other solution didnt show up i have to use this code and
method.
Regards
Rahi
Feb 18 '08 #3

P: n/a
ra**********@gmail.com wrote:
On Feb 18, 3:43 pm, Betikci Boris <pard...@gmail.comwrote:
>On Feb 17, 3:29 pm, "rahismail...@gmail.com" <rahismail...@gmail.com>
wrote:
>>I need to run a script in every 10 seconds in background of the site
of 10-15 php pages.
So how do i activate that script?
Is there a code to be embedded in every php page so that the script
got run after every 10 seconds.
I need not to monitor that script.
This script will make some comparisions and then make changes in the
database.
Please reply as this is very neccesary for completion of my project.
Regards
Rahi Jain
its not about php use this html code -<meta http-equiv='refresh'
content='10'>

I think it will work but i need script to be run in back ground.
This way i have to keep that page open all the time during the trading
hours ( Privately on one node).
if any other solution didnt show up i have to use this code and
method.
Regards
Rahi
Which suffers from the problems I described above...

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 18 '08 #4

P: n/a
On Feb 18, 1:00 pm, "rahismail...@gmail.com" <rahismail...@gmail.com>
wrote:
On Feb 18, 3:43 pm, Betikci Boris <pard...@gmail.comwrote:
On Feb 17, 3:29 pm, "rahismail...@gmail.com" <rahismail...@gmail.com>
wrote:
I need to run a script in every 10 seconds in background of the site
of 10-15 php pages.
So how do i activate that script?
Is there a code to be embedded in every php page so that the script
got run after every 10 seconds.
I need not to monitor that script.
This script will make some comparisions and then make changes in the
database.
Please reply as this is very neccesary for completion of my project.
Regards
Rahi Jain
its not about php use this html code -<meta http-equiv='refresh'
content='10'>

I think it will work but i need script to be run in back ground.
This way i have to keep that page open all the time during the trading
hours ( Privately on one node).
if any other solution didnt show up i have to use this code and
method.
Regards
Rahi
Or you can embed a peforming script to dense used page in general..
Feb 18 '08 #5

P: n/a
ra**********@gmail.com wrote:
On Feb 18, 3:43 pm, Betikci Boris <pard...@gmail.comwrote:
>On Feb 17, 3:29 pm, "rahismail...@gmail.com" <rahismail...@gmail.com>
wrote:
>>I need to run a script in every 10 seconds in background of the site
of 10-15 php pages.
So how do i activate that script?
Is there a code to be embedded in every php page so that the script
got run after every 10 seconds.
I need not to monitor that script.
This script will make some comparisions and then make changes in the
database.
Please reply as this is very neccesary for completion of my project.
Regards
Rahi Jain
its not about php use this html code -<meta http-equiv='refresh'
content='10'>

I think it will work but i need script to be run in back ground.
This way i have to keep that page open all the time during the trading
hours ( Privately on one node).
if any other solution didnt show up i have to use this code and
method.
Regards
Rahi
Use Ajax, and use setTimeout in the javascript.
Feb 18 '08 #6

P: n/a
On Feb 17, 5:29 am, "rahismail...@gmail.com" <rahismail...@gmail.com>
wrote:
I need to run a script in every 10 seconds in background of the site
of 10-15 php pages.
So how do i activate that script?
Is there a code to be embedded in every php page so that the script
got run after every 10 seconds.

I need not to monitor that script.
This script will make some comparisions and then make changes in the
database.
Please reply as this is very neccesary for completion of my project.

Regards
Rahi Jain
I agree with Stuckle, use "cron (Linux/Unix) or scheduled task
(Windows). "
to schedule the the execution on php scripts.. you can set when it
should run.
how often.. etc.. but the fact is, you really need dedicated server..
and some vps offers
this service too.. you can setup cron by CPANEL or root(SSH), but i
dont know with plesk..

but if really dont have such root access on your server, there is
another way..
you only need a dedicated computer on your side.. 24/7 open.. only
need a desktop application
that manipulate your data remotely, is easy to remotely manipulate the
mysql (just allow your computer IP) you can make a desktop application
that can act also a php script, the same function, and process..
program it to repeat every 10 seconds.. (the problem is the speed of
the internet)

or a desktop application that call a hidden php script from the server
every 10 seconds..
each call, php perform such task..
Feb 19 '08 #7

P: n/a
On Feb 19, 1:29 pm, "radmissio...@gmail.com" <radmissio...@gmail.com>
wrote:
On Feb 17, 5:29 am, "rahismail...@gmail.com" <rahismail...@gmail.com>
wrote:
I need to run a script in every 10 seconds in background of the site
of 10-15 php pages.
So how do i activate that script?
Is there a code to be embedded in every php page so that the script
got run after every 10 seconds.
I need not to monitor that script.
This script will make some comparisions and then make changes in the
database.
Please reply as this is very neccesary for completion of my project.
Regards
Rahi Jain

I agree with Stuckle, use "cron (Linux/Unix) or scheduled task
(Windows). "
to schedule the the execution on php scripts.. you can set when it
should run.
how often.. etc.. but the fact is, you really need dedicated server..
and some vps offers
this service too.. you can setup cron by CPANEL or root(SSH), but i
dont know with plesk..

but if really dont have such root access on your server, there is
another way..
you only need a dedicated computer on your side.. 24/7 open.. only
need a desktop application
that manipulate your data remotely, is easy to remotely manipulate the
mysql (just allow your computer IP) you can make a desktop application
that can act also a php script, the same function, and process..
program it to repeat every 10 seconds.. (the problem is the speed of
the internet)

or a desktop application that call a hidden php script from the server
every 10 seconds..
each call, php perform such task..
Jerry is right as always.
Yes i will be using cron to solve this problem.
I dont have a dedicated server but it has Cpanel(So i can apply cron
feature).
Feb 19 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.