none
Task Scheduling on Windows 2008 with error code 0x41301

    Question

  • Hello

    We have windows server 2008 Standard 64 bit SP2 and we are facing problem in schedule task running. It showed in running status but actually its not working. We tried to run this task with domain and local account as well but failed. We have checked serveral articles which showed the same issue but not working for our issue. We checked the below points

    1. Account have rights to run task scheduler is in group "log on as batch job" rights (on server side).

    2. Account have admin previliges on the server.

    3. Tried to create simple task like launch calc or notepad launch. Create batch to ping server but nothing helped me out. Change the location path and gave the explicit permission on particular location but nothing happend.

    4. The Scheduled Task is set with "Run whether user is loggon on or not" and "Run with highest privileges".

    5. Do not understand how will do that "Check if the script runs under a path where the logon domain user has the proper permission.  If not, you may add a path like "c:\users\%username%\desktop" into the Scheduled Task start in properties."

    Does anyone have any idea what "innovation" is holding up my progess? :)

    Thanks

    Friday, May 18, 2012 2:43 PM

Answers

All replies

  • 1. You can include your script in simple debugging envelope

    @echo off
    echo %date% %time% %username% >> c:\test.txt
    cscript //nologo c:\your_script.vbs 1>>c:\test.txt 2>>&1

    echo %date% %time% >> c:\test.txt

    2. You can use Audit tool for forensic analysis

    Regards

    Milos

    Friday, May 18, 2012 5:08 PM
  • set your "start in" location for the application.  That made it work for me.

    Tuesday, September 10, 2013 5:19 PM
  • scratch that.

    its not an error at all,  it is just a status condition meaning that the task is currently running.

    SCHED_S_TASK_READY
    0x00041300

    The task is ready to run at its next scheduled time.

    SCHED_S_TASK_RUNNING
    0x00041301

    The task is currently running.

    SCHED_S_TASK_DISABLED
    0x00041302

    The task will not run at the scheduled times because it has been disabled.

    SCHED_S_TASK_HAS_NOT_RUN
    0x00041303

    The task has not yet run.

    SCHED_S_TASK_NO_MORE_RUNS
    0x00041304

    There are no more runs scheduled for this task.

    SCHED_S_TASK_NOT_SCHEDULED
    0x00041305

    One or more of the properties that are needed to run this task on a schedule have not been set.

    • Proposed as answer by 4174 Thursday, January 19, 2017 11:22 AM
    Tuesday, September 10, 2013 5:23 PM
  • I had something similar where I had 2 very simple one line batch files scheduled at different times of the day and they both would never complete with a Last Run Result of "The Task Is Currently Running 0x41301". After digging around, it turned out that I needed to populate the "Start In" value in the Actions Tab which I don't think I ever had to do before but these batch files were located in system protected folders.

    I have also seen this occur when the user account that is configured to run the scheduled task needs to belong to the access list for "Log On as a Batch Job" which is located by starting gpedit.msc > Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment > Log on as a batch job.


    Thursday, March 19, 2015 4:00 PM
  • That's also seems to be what's happened to us.. The underlying cause was running multiple instances of the same process it was triggering (identified in task manager), which in turn run some long queries in sql server..
    Tuesday, June 9, 2015 8:51 PM