possibly a struct containing status, time and task name might merge callbacks to be just on_exit instead