This issue occurs when the task has the following settings:
- Enable "Run whether user is logged on or not" in the general settings, and specify a user who does not have its user profile directory created yet on the local computer.
- Enable "Repeat task every: xx" or "Stop task if it runs longer than: xx" in the triggers settings.