How to fix «The specified account name is not valid» for Task Scheduler in Windows 10?

2023-04-15--13-19-54

2023-04-15--13-20-22

A workaroung is to use the «Run only when user is logged in» option on the «General» tab:

2023-04-15--14-42-38

How did I fix it.