A generic task runner