spelltwister Posted February 28, 2006 Share Posted February 28, 2006 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 Quote Link to comment Share on other sites More sharing options...
litebearer Posted February 28, 2006 Share Posted February 28, 2006 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... Quote Link to comment Share on other sites More sharing options...
spelltwister Posted March 1, 2006 Author Share Posted March 1, 2006 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. ThanksMike Quote Link to comment Share on other sites More sharing options...
dcole07 Posted March 1, 2006 Share Posted March 1, 2006 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... Quote Link to comment Share on other sites More sharing options...
spelltwister Posted March 1, 2006 Author Share Posted March 1, 2006 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.