Add a general purpose task scheduler