Continuous Script
Moderator: General Moderators
-
cooldude_i06
- Forum Newbie
- Posts: 2
- Joined: Thu Aug 26, 2004 7:43 pm
Continuous Script
Hi, I'm new to the forums and SQL, but i have been able to setup a simple mysql database. I'm looking for a script that can run continuously in the background and perform some necessary calculations every few minutes. I know some php but im not sure if php can be executed non-stop, without having to go to a url. The database is on a web server and not my computer. Thanks in advance.
-
cooldude_i06
- Forum Newbie
- Posts: 2
- Joined: Thu Aug 26, 2004 7:43 pm
ok my webserver supports cron jobs, and i think the best way to accomplish my task would be to create a php script and have cron execute it ....right??markl999 wrote:Sounds like you want a cron job
if this is true can u also help me with the command of executing a php script, thanks again.
Right.ok my webserver supports cron jobs, and i think the best way to accomplish my task would be to create a php script and have cron execute it ....right??
2 ways really. Either run the script in cron like '/usr/bin/php -q thescript.php' or put #!/usr/bin/php at the top (before the <?php tag) of your script and run just thescript.php from cron.if this is true can u also help me with the command of executing a php script, thanks again.