Jump to content

Archived

This topic is now archived and is closed to further replies.

spelltwister

Running scripts automatically

Recommended Posts

Hey guys and gals,

Here's my problem. I just finished programming an online game and I have some php script that generates xml files. Well, to do this, I type in the address of the file on the server and pass it to variables in the addressbar. It then queries a database and does everything fine and dandy. Problem is, I need it to do that automatically. I cannot be sitting at my computer 24-7 typing stuff in the address bar. Is there a way I can run the php script and pass those variables automatically?

Thanks a bunch, this is the last thing I need to do :-D.

Mike

Share this post


Link to post
Share on other sites
Look into cron

[a href=\"http://www.hotscripts.com/PHP/Scripts_and_Programs/Guestbooks/more4.html\" target=\"_blank\"]http://www.hotscripts.com/PHP/Scripts_and_...ooks/more4.html[/a]

Lite...

Share this post


Link to post
Share on other sites
Hello, I've looked into cron, but from what I can gather, it works like this:

You can have it do a number of things automatically, but not actually.. run? a web page. I'm not sure what you'd call that, but what I need it to do is actually.. hit? the page with one variable (origianlly I thought it was two, but only one is necessary) so it does updates to the database. If I'm misunderstanding cron, please let me know. Thanks

Mike

Share this post


Link to post
Share on other sites
Well you can have it run programs for you... so you can tell it to open FireFox at 9:08.
You could also have it run a task when an even happens... like have a page tell it to run the xml (or what ever your putting in the address bar...)

So a user will go to a page, that will make the cron run (there are other programs like it... cron is for Unix computer basicly) and cron will open your brower and go to a URL...

Share this post


Link to post
Share on other sites
After doing some looking around on this site for other questions regarding cron, I'm going to have to just try a few things.

I guess my new question would be, is there a way to dynamically create cron jobs?

Here's what I need. I have 1 php file that will run fine from the address bar with the variable passed to it. What I need, since it's an online gaming site, is for it to update a set number of games per day. For example, I have games 1-10 full of players playing a game. I want game 1,2 to update on monday, game 3,4 to update tuesday, etc. But I need the cron job to be created when I "launch" the game to the public. So... is there a way to do that? Thanks so much.

Mike

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.