The value in the string Last Result: 267011 converts to hexadecimal 0x41303, which is SCHED_S_TASK_HAS_NOT_RUN. It indicates that Task Scheduler has not recorded a completed execution of the task. The Last Run Time of 11/30/1999 12:00:00 AM is a placeholder, not an actual execution timestamp. The SUCCESS: Attempted to run the scheduled task message confirms only that Windows accepted the request to start the task, not that the task actually executed.
The first thing to investigate is the task's Logon Mode: Interactive only. This indicates that the task is configured to run only when the specified user is logged on. The Log on as a batch job right does not override that configuration. If you created the task with /IT, it requires the user's interactive session. Try running the task while signed in as the configured Run as User account, and confirm that the task's configured logon type matches your intended execution scenario. If the task must run without that user being logged on, recreate or update it to use a non-interactive logon configuration, with the appropriate credentials and permissions.
Next, inspect the task's complete configuration using schtasks /query /tn "[jobname]" /xml and review the LogonType, UserId, Triggers, Actions, and Settings elements. Also enable Task Scheduler's Operational log under Event Viewer at Applications and Services Logs > Microsoft > Windows > TaskScheduler > Operational, then issue schtasks /run /tn "[jobname]" and inspect the events generated at that time. These events can help distinguish a task-launch failure from an action that starts and immediately exits.
Since you have already verified that the command runs successfully from an interactive command line, focus first on the task's configured logon type, the account under which the action executes, and the Task Scheduler Operational log. The fact that the task works interactively does not mean that it can run under the task's configured security context.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin