Scheduled task will run when I run it manually but I get an 0x800710E0 error when run automatically

0

I have created a scheduled tasks using a ps1 file which creates a back up of a file on onedrive. The script works when I run manually via the scheduled task screen but when it tries to run through the trigger I have set I get an 0x800710E0 error

I have tried every option in General, Options and Conditions.

Here is the scheduled task settings I have set right now in xml:

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2019-04-28T13:29:34.8238925</Date>
    <Author>LAPTOP-5E0BAOCL\Alex</Author>
    <URI>\Backup Gym Application</URI>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <StartBoundary>2019-04-28T16:02:54</StartBoundary>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>S-1-5-21-2484025877-494337154-2092944163-1001</UserId>
      <LogonType>S4U</LogonType>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
    <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe</Command>
      <Arguments>C:\Users\Alex\OneDrive\Documents\BackUpGymApplication.ps1</Arguments>
    </Exec>
  </Actions>
</Task>

I expect the script to create back up of the file in one drive but I am getting a 0x800710E0 error.

powershell
scheduled-tasks
asked on Stack Overflow Apr 28, 2019 by Alex Hall

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0