big refactoring from a daemon style poll to a cronjob based one