You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0x41300: "Task is ready to run at its next scheduled time",
0x41301: "Task is currently running",
0x41302: "Task is disabled",
0x41303: "Task has not yet run",
0x41304: "There are no more runs scheduled for this task",
0x41306: "Task was terminated by the user",
0x8004130F: "Credentials became corrupted",
0x8004131F: "An instance of this task is already running",
0x800710E0: "The operator or administrator has refused the request",
0x800704DD: "The service is not available (Run only when logged in?)",
0xC000013A: "The application terminated as a result of CTRL+C",
0xC06D007E: "Unknown software exception",
}
This leads to exceptions, for example:
File "C:\salt\var\cache\salt\minion\extmods\modules\win_task.py", line 1478, in info
"last_run_result": results[task.LastTaskResult],
KeyError: -2147020576
-2147020576 would be 0x800710E0 and so "The operator or administrator has refused the request".
Also result codes that are not yet in the lookup dict lead to similar exceptions instead of showing a useful text.
File "C:\salt\var\cache\salt\minion\extmods\modules\win_task.py", line 1477, in info
"last_run_result": results[task.LastTaskResult],
KeyError: 1073807364
Better would be to simply show the result code in such cases (here: "0x40010004").
The text was updated successfully, but these errors were encountered:
Description
High result/error codes numbers are return negative numbers by and so not found in the results lookup dict:
salt/salt/modules/win_task.py
Lines 154 to 171 in eedcf49
This leads to exceptions, for example:
-2147020576 would be 0x800710E0 and so "The operator or administrator has refused the request".
Also result codes that are not yet in the lookup dict lead to similar exceptions instead of showing a useful text.
Better would be to simply show the result code in such cases (here: "0x40010004").
The text was updated successfully, but these errors were encountered: