Task scheduler completed with with return code 2147942655

Anonymous
2024-11-25T07:56:32+00:00

Hi,

I have a server running Windows Server 2016 Standard.

I have a scheduled task to run a bot (".exe" file) every day at 08:00 AM.

I configured its settings that if the task fails it, Task Scheduler should restart it every 1 minute and up to 10 attempts.
On 08:01 AM the task was supposedly completed successfully, however the action wasn't performed (the bot wasn't running) and the event message (under History tab) was:

"Task Scheduler successfully completed task "TASK NAME" , instance "{INSTANCE ID}" , action "Bot.exe" with return code 2147942655.

Can someone please help me understand why the recovery/restart didn't work?

Regards,

Daniel

Windows for business Windows Server Performance System performance

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Anonymous
    2024-11-25T09:17:05+00:00

    Hello

    Thank you for posting in Microsoft Community forum.

    The return code 2147942655 indicates an "Access Denied" error. This typically means that the task did not have the necessary permissions to execute the action.

    Here are a few steps you can take to troubleshoot and resolve this issue:

    Check Permissions: Ensure that the user account running the task has the necessary permissions to execute the bot. You might want to try running the task with the highest privileges.

    Run Manually: Try running the bot manually from the command line using the same user account to see if it executes without issues.

    Task Configuration: Double-check the task settings in Task Scheduler:

    Ensure "Run with highest privileges" is checked.

    Verify that the correct user account is selected under the "General" tab.

    Check the "Actions" tab to ensure the path to the executable is correct and accessible.

    Event Viewer: Look for more detailed error messages in the Event Viewer under "Windows Logs" -> "Application" or "System" that might give more insight into why the task failed.

    Dependencies: Ensure that any dependencies required by the bot (e.g., network access, other services) are available at the time the task runs.

    Best Regards,

    Wesley Li

    0 comments No comments
  2. Anonymous
    2024-11-25T15:18:47+00:00

    Hello Wesley,

    Thank you for replying.

    I configured the scheduled task to run under the Administrator account.

    When I run the scheduled task manually it works as expected and starts the bot.

    It also works as expected when I run the bot manually.

    Check permissions - I configured the scheduled task to run with the highest privileges.

    Task configuration - Already configured. I double-checked it today.

    Event viewer - I didn't find relevant error messages under "Application" or "System" that might be helpful for this issue.

    Dependencies - Available. I double-checked it today.

    Do you have another idea what might cause this issue?

    Regards,

    Daniel

    0 comments No comments