This method is called immediately before a task is executed.
The task about to be executed. Never null.