Jump to content

Running scripts automatically


spelltwister

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
Link to comment
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
Link to comment
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...
Link to comment
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.