php - Is it bad design to require my website to have a cron script running every minute or two? -


basically i'm designing alert system in php codeigniter. want alerts "scheduled" inserting database row , sent out in batches periodically. alerts sent out via email.

the way can think achieve require cron script call cli-only controller every minute or checks scheduled alerts , sends them if finds anything.

something telling me having cron script run poorly designed can't think of other way it.

advice?

making alerts asynchronous separating alert task rest of code desirable.

i don't see problem cron script , ask why need often? setting threshold idea , still need check @ end of day or whenever make sure has fired anyway.

you rather use whole overhead of controller (and rest of framework there) - maybe make lightweight cli php script


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -