Add validation for task.done in combination with periodic task.