none
Server 2008 R2 Scheduled Task - 2147942402 RRS feed

  • Question

  • i'm having a devil of a time getting my scheduled task to run.  the scheduled task runs a backup of our database using bat files.  tomorrow is my last day at this company and i said i would have the backup issue resolved by then.  i've scoured the web and tried whatever i can find with no luck.  any help appreciated.

    details:

    • scheduled task set to run every week
    • runs bat file that dumps and archives database
    • bat file works fine when run from command line
    • windows server 2008 r2
    • user appear to have Full control for both directory referenced and bat file called

    Selections:

    • run whether user is logged on or not
    • run with highest privilidges
    • user has admin rights (user was set up specifically to run these types of routines, and works for other scheduled tasks)
    • configured for windows 7/server 2008 r2 (also tried vista/server 2008)
    • trigger: weekly
    • action: run batch file.  fully qualified path included.  also added path to start in
    • conditions: nothing checked.  also unchecked stop if computer ceases to be able just in case

    History shows Action failed to start and Action start failed:

    Log Name:      Microsoft-Windows-TaskScheduler/Operational
    Source:        Microsoft-Windows-TaskScheduler
    Date:          3/12/2013 9:58:11 AM
    Event ID:      203
    Task Category: Action failed to start
    Level:         Error
    Keywords:      
    User:          215158-1\scriptuser
    Computer:      215158-1
    Description:
    Task Scheduler failed to launch action "C:\Users\Administrator\Documents\dbscripts\archive_install_full" in instance "{4f0bf1d8-3f71-45ca-8c44-3b0c180c1f57}" of task "\archive_accuclass_full". Additional Data: Error Value: 2147942402.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}" />
        <EventID>203</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>203</Task>
        <Opcode>101</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2013-03-12T16:58:11.476750000Z" />
        <EventRecordID>73150</EventRecordID>
        <Correlation ActivityID="{4F0BF1D8-3F71-45CA-8C44-3B0C180C1F57}" />
        <Execution ProcessID="16836" ThreadID="15272" />
        <Channel>Microsoft-Windows-TaskScheduler/Operational</Channel>
        <Computer>215158-1</Computer>
        <Security UserID="S-1-5-21-979288841-1123399507-1266732637-1001" />
      </System>
      <EventData Name="ActionLaunchFailure">
        <Data Name="TaskName">\archive_accuclass_full</Data>
        <Data Name="TaskInstanceId">{4F0BF1D8-3F71-45CA-8C44-3B0C180C1F57}</Data>
        <Data Name="ActionName">C:\Users\Administrator\Documents\dbscripts\archive_install_full</Data>
        <Data Name="ResultCode">2147942402</Data>
      </EventData>
    </Event>

    thanks in advance for your help - really trying to get this off my plate!

    -Steve


    Tuesday, March 12, 2013 5:18 PM

Answers

  • Grant 'scriptuser' account permission to Log on as a batch job on the server and see if that works.



    Regards, Santosh

    I do not represent the organisation I work for, all the opinions expressed here are my own.

    This posting is provided "AS IS" with no warranties or guarantees and confers no rights.

    Whenever you see a helpful reply, click on Alternate Text Vote As Helpful & click on Alternate Text Mark As Answer if a post answers your question.

    Wednesday, March 13, 2013 4:48 AM
    Moderator

All replies

  • Grant 'scriptuser' account permission to Log on as a batch job on the server and see if that works.



    Regards, Santosh

    I do not represent the organisation I work for, all the opinions expressed here are my own.

    This posting is provided "AS IS" with no warranties or guarantees and confers no rights.

    Whenever you see a helpful reply, click on Alternate Text Vote As Helpful & click on Alternate Text Mark As Answer if a post answers your question.

    Wednesday, March 13, 2013 4:48 AM
    Moderator
  • You have your script in the administrator's profile yet the account the task is being run under is 215158-1\scriptuser

    C:\Users\Administrator\Documents\dbscripts\archive_install_full

    215158-1\scriptuser does not have access to C:\Users\Administrator\Documents\dbscripts\archive_install_full

    Thursday, August 15, 2013 12:18 AM
  • I was getting the same error, and as I mentioned here, error code 2147942402 means File Not Found. It turned out that I had specified an invalid file path for my Scheduled Task to run. Once I pointed it at an exe that actually existed everything ran as expected.

    - Dan - "Can't never could do anything"

    Friday, February 9, 2018 10:46 PM