I have 24 databases with a table labeled email_queue
.
I have another database with a list of all the databases that have the email_queue
table
In your script try this.
set_time_limit(0);
in order to override PHP's max_execution_timegetopt()
function to get the database name when the script is ran from the command line (i.e. php script.php -d database1
).-d
) I specified in 2. If you have 20 databases then you must have 20 entries.Using this way you will see a separate PHP process for each cron job and you can isolate a database if ever you will encounter an error with it.