Jump to content


Photo

Running scripts automatically


  • Please log in to reply
7 replies to this topic

#1 Ge64

Ge64
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 27 February 2006 - 04:53 PM

For my website I need to update a few numbers in the mysql database exactly every hour, so I will need to run a php script then. Is there a way to make a PHP script do something at a particular moment?

#2 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 27 February 2006 - 04:56 PM

if your web server uses cron jobs, you can run a script every hour with that. Do a search on cron jobs here and you should find it no problem.

Ray

#3 Ge64

Ge64
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 27 February 2006 - 05:55 PM

[!--quoteo(post=349884:date=Feb 27 2006, 05:56 PM:name=craygo)--][div class=\'quotetop\']QUOTE(craygo @ Feb 27 2006, 05:56 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
if your web server uses cron jobs, you can run a script every hour with that. Do a search on cron jobs here and you should find it no problem.

Ray
[/quote]

No it doesnt, but is there software to run php scripts at certain times so I can put it on one of my 24/7 pc's and run it remotely?

#4 litebearer

litebearer
  • Members
  • PipPipPip
  • Advanced Member
  • 2,357 posts
  • Locationwhite lake michigan

Posted 27 February 2006 - 05:59 PM

you could use windows task scheduler to run your browser at the appointed times. and have the browser point to a php script that does what you want done.

clear as mud?

Lite...

all the brothers were valiant!

[br][br]The truely intelligent people are not those who create the dots; rather they are they ones with the ability to connect the dots into a coherent picture

#5 joecooper

joecooper
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 27 February 2006 - 06:23 PM

let me know if your still looking for one, i could whip up a visual basic program for you to run it
Signature:
[/a]
[a href="http://www.planet-so...=1999&lngWId=8" target="_blank"]EzLogin 1.0[/a]
[a href="http://www.essexracers.com" target="_blank"]Essexracers.com[/a]
Msn Messenger: joe@joeyjoe.co.uk

#6 Ge64

Ge64
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 27 February 2006 - 06:33 PM

[!--quoteo(post=349910:date=Feb 27 2006, 07:23 PM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Feb 27 2006, 07:23 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
let me know if your still looking for one, i could whip up a visual basic program for you to run it
[/quote]

Do you have code to run sql queries on remote mysql servers? Because that would be even better but probably a lot of work. What I need is a few scripts that need to run at all sorts of times, like every day or every hour, or totally random. You would only need to use an Inet control because I have the files on a HTTP server with PHP so you only have to run them then, don't think thats really hard to do right? I would actually do it myself but I lost my VS cd :(

Let me know if you feel like doing that...

#7 joecooper

joecooper
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 27 February 2006 - 06:36 PM

tell me the files you want to run, and at what times, and ill add it to the cron jobs on my server
Signature:
[/a]
[a href="http://www.planet-so...=1999&lngWId=8" target="_blank"]EzLogin 1.0[/a]
[a href="http://www.essexracers.com" target="_blank"]Essexracers.com[/a]
Msn Messenger: joe@joeyjoe.co.uk

#8 Ge64

Ge64
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 27 February 2006 - 06:39 PM

[!--quoteo(post=349917:date=Feb 27 2006, 07:36 PM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Feb 27 2006, 07:36 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
tell me the files you want to run, and at what times, and ill add it to the cron jobs on my server
[/quote]

The site isnt finished yet so I don't know... Is there a cron jobs module for apache2?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users