postgres function to get listener hours easily
Classificated and daemonized the whole thing