What is the “task” here? Usually this is a case to use delegates which you can broadcast when a task is finished, instead of checking state after delay, if that is what you are trying to do.
Another way, closer to a “delay” is to run a timer from a function:
https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/UseTimers/