Made scheduler messages more safe for socket.io