Jump to content

2 Questions: Scheduling PHP scripts & Running scripts in background


peterbz

Recommended Posts

I have 2 questions.

 

1st Question:

I was wondering how you can schedule PHP scripts to run at a given interval to update a MySQL database.  I want the script to update 3 remote MySQL database one after another.  However, how do I detect and check when each one is finished before moving on to another one.

 

2nd Question:

I have a form that a user has to fill out.  After he fills it out, I want to send him to a report screen.  However, I have another script that deals with updating and retrieving data from database that may require some time to finish executing.  How do I send the user to the report screen and also have the script running in the background after the user clicks Submit.  Of course, I can just send the browser straight to the script and wait until it is done before redirecting to the report screen, but what if the user refreshes the page?

Is it possible to detect when an update to multiple databases are finished from another script.

 

For example, I have a script that updates 200 databases.  This will probably take a while to finish.  Then I want another script to execute when the first is completed.  How can I do that?

Archived

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

×
×
  • 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.