I have a script which walks through database table, makes some checks and based on them it makes notifications for website users. It works for a pretty long time. Currently in dev it takes a minute for every user. So I think I need to set max execution time(.htaccess, php etc) to 0 for this one.
Currently it's launched from "drupal page with form", later I'll be launching it with
cron. Drupal is not letting me set
set_time_limit(0) because it's not the beginning of file where I can put it. But I don't want to
set_time_limit(0) for whole website.
Is there a way bypass this limitaion? Maybe some external script execution? I'd like to remain Drupal functionality in it.