As others have found, if you change the name of your computer, scheduled tasks that were associated with a specific user account (as the logon trigger, as the user credential for the task, and so on) will no longer appear in the Scheduled Tasks list. Scheduled Tasks displays the message "An error has occured for task xxxx. Error message: The specified account name is not valid." The same thing happens if you delete a user account that was named in a Scheduled Task.
The reason for the problem is that the computer name is part of the account name (for example, "mycomputer\myaccount"), and so if either part of the name is invalid, the associated account is no longer recognized. Unfortunately, since Scheduled Tasks will not display the broken task entry, you can't fix it directly.
The tasks themselves are defined in plain-text XML files stored in \windows\system32\tasks. The files have the same name as their Scheduled Tasks entries.
If a task is unwanted, you can simply delete the corresponding file from \windows\system32\tasks.
If you want to restore a task, you have to change the computer name and/or account name whereever it occurs in the task file. But, you can't simply edit the file in place to fix the problem. Scheduled Tasks detects that the file has been modified externally and again won't use or display it.
I was able to fix the problem using the following steps:
- Move the file for the broken task entry from \windows\system32\tasks into another folder. You want to move it, not copy it -- the file has to be taken out of \windows\system32\tasks. You can do this using Windows Explorer or the move command in a command prompt window.
- Open the file in its new location using Notepad. Fix the computer name and/or account name wherever it occurs and save the file. Repeat steps 1 and 2 for any other problem tasks.
- Open Scheduled Tasks or select menu Action, Refresh. There should be no error messages now, since the problem task was removed.
- Under the Action menu, use the Import command to locate the edited file. This will restore the scheduled task.
- Test the restored task by right-clicking it and selecting Run. Once everthing is working you can delete the old versions of the task file from whereever you'd moved it. Repeat steps 4 and 5 for any other edited task files.