Well basically I may want to execute a script that may take as much as 1 hours as well.
What I really want to do is Send SMS to my users using a third party API. So
IN THE CASE YOU CAN RUN CRON JOBS
I usually have a queue, a manager and workers. Unless you can call the sms api once at the time this model can help you, and you souldn't worry about timeouts since each worker will manage it selves.
I have something like:
{
// update to running
exec("/usr/bin/php /path/to/send.php {$id} > /dev/null &");
// }
and send.php will send each sms. Right now I have this running at a rate of 300/minute since is the max frequency that you can setup on a cron job