Ensure that the same task does not end up getting scheduled twice.