Планировщик заданий ошибка 2147942402

I have a number of different sheduled tasks that are set to run some executable files written in VB.Net. When they go to run they almost always get an error saying that the task failed to start and references this error value:

Additional Data: Error Value: 2147942402

How can I fix this?

asked Aug 8, 2012 at 13:15

Rick Eyre's user avatar

2

I was getting the same error message. As pointed out in this other answer, it turns out that the error code 2147942402 actually means File Not Found.

I was creating my Scheduled Task programmatically, and it turned out that I had a typo in the path of the executable that I was specifying to run, and it didn’t actually exist. Once I corrected the file path of the exe that the Scheduled Task was set to run then everything worked as expected.

answered Feb 9, 2018 at 22:41

deadlydog's user avatar

deadlydogdeadlydog

22.2k14 gold badges109 silver badges118 bronze badges

2

I had the same issue when I tried running web pages with IE using windows scheduler.

Follow these steps:

-Right click your task -> properties.

-Click the Settings tab, look for «If the task is already running, then the following rule applies», should be at the bottom of the dialog, and set the DropDownList value to «Stop the existing instance».

-Click the Actions Tab, edit your task, under Program/script choose the FULL PATH of the application running your task (In my case I replaced iexplore.exe with C:Windowswinsxs…iexplore.exe)

Hope this helps you :-)

answered Apr 26, 2017 at 15:51

user3476222's user avatar

I got the same Additional Data: Error Value: 2147942402.
For me the solution that worked was to delete the task and create the new one, the same that was deleted. You can also try to validate the password for user on with the task is running.

answered Feb 4, 2015 at 7:54

Janusz Nowak's user avatar

Janusz NowakJanusz Nowak

2,5351 gold badge17 silver badges36 bronze badges

1

Changing permissions, different files or locations didn’t work for me.
I had to create a brand new task and disable the old one, and it worked for me. Something must’ve been corrupted with the original task.

answered Aug 20, 2018 at 16:16

Eric's user avatar

EricEric

312 bronze badges

1

I fixed this error by changing «Run whether user is logged on or not» to «Run Only when user is logged on» on the General tab of the task.

You must a valid user on the General tab-> security options-> «When running the task, use the following user account:»

answered Sep 10, 2021 at 16:48

Bluegrasser's user avatar

I was getting this error when running a batch file as my scheduled task. My task action pointed to a batch file and executed successfully but reported operational code 2 and the following details.

Task Scheduler successfully completed task...., action "C:WindowsSYSTEM32cmd.exe" with return code 2147942402

I fixed this by changing the final exit code to:

exit 0

Make sure to trap and handle errors in the batch file. If the batch runs successfully then change «exit» to «exit 0». Now the task scheduler result is «The operation completed successfully (0x0)».

answered Aug 2, 2022 at 20:08

Tim Dawg's user avatar

I encountered the same issue while executing the command on the remote server. I fixed the issue by including cmd /c in front of the command.

The command for which I was getting error:

<filepath> <command to run>

The fix that solved the issue.

cmd /c <filepath> <command to run>

answered Feb 12 at 3:57

kgangadhar's user avatar

kgangadharkgangadhar

4,7765 gold badges36 silver badges54 bronze badges


Server 2008 R2 (полностью исправлен)

Я пытаюсь запустить запланированное задание для перемещения файлов указанного типа из C: Windows Temp в E: Foo_blah_blah_blah_blah Foo2 и по какой-то причине получаю следующую ошибку:

Планировщику не удалось запустить экземпляр задачи «{fe0f148a-cece-44a0-a4d1-914aaf21daa8}» задачи » Move Temp Files» для пользователя «FOOBOX Administrator». Дополнительные данные: Значение ошибки: 2147942402

Есть идеи, почему это происходит?

Дополнительные детали:

  • Задача настроена для запуска от имени учетной записи, обладающей полномочиями для перемещения файла.
  • Задача настроена на выполнение независимо от того, вошел ли пользователь в систему или нет. Это терпит неудачу для обоих сценариев — те же самые ошибки.
  • Задача настроена на запуск для локальной ОС (Windows Server 2008)
  • Команда разбита на две части. Программа / скрипт: moveДобавить аргументы:C:WindowsTemp*.foo E:Foo_blah_blah_blah_blahFoo2

Если я запускаю эту же команду move C:WindowsTemp*.foo E:Foo_blah_blah_blah_blahFoo2из командной строки Windows, она работает нормально.

Чего мне не хватает?


Ответы:


Как отметил Райан Райс, 2147942402 переводится как «Файл не найден», что является очень подходящим ответом. Попробуйте нажать Win + R, введите «move» и нажмите enter — это интерактивный эквивалент того, что ваша задача не справляется.

Причина в том, что MOVEэто не программа, а встроенная команда в cmd.

Должен быть:

Программа: "cmd.exe"
Аргументы:"/c move C:WindowsTemp*.foo E:Foo_blah_blah_blah_blahFoo2"


Причина в том, что задание настроено на удаление, если не запланировано повторное выполнение. Это настраивается на вкладке «Настройки». Удаление Задачи выполняется во время истечения Триггера, который запускает Задачу. Если время истечения триггера точно совпадает со временем запуска триггера, может (случайно) произойти, если Задание будет удалено за несколько секунд до срабатывания триггера. Это вызывает событие 101 с кодом причины 2147942402. Решение состоит в том, чтобы установить время истечения триггера на 1 мин позже времени начала триггера.


Может быть, это проблема пробелов в строке порядка заказа:

C: Program Files Wireshark Wireshark.exe -i1 -k FAILS

«C: Program Files Wireshark Wireshark.exe» -i1 -k ОК

In this post we’ll talk about three popular windows task scheduler error codes, task Scheduler 2147942401, 2147942402, and 2147942403. Those error prevent users from running their scheduled tasks successfully. If you’re using windows task scheduler often, chances are you’ve come across one or two of these codes. We’ll take a look at all the three error codes separately so that you can fully understand them. Let’s take a look at them right away.

How To Fix Task Scheduler 2147942401, 2147942402 and 2147942403

Task Scheduler 2147942401

When converted to hex code, task scheduler 2147942401 is the same as 0x80070001. This error code is confusing also because the task will be marked as ‘successfully completed’ but with the code 0x80070001. The error code indicate ‘illegal function’

Possible causes

The main cause is when the ‘start in’ for the configured action isn’t filled out.

How to fix it

In order to fill this you should open your schedule task and then right-click to open properties window. Navigate to actions tab and then click edit. When you open it you’ll realize it’s not filled and you need to fill in the path to your batch file. Once you filled that the problem will definitely be solved. This is the best way to fix task scheduler error code 2147942401 which is also the same as 0x80070001.

Task Scheduler 2147942402

2147942402 is the same as 0x80070002 when you convert to hex, it means file not found.

Possible cause

It might be possible there is an error when typing the path to the file, so try checking the file path before applying any fix. Some users have reported making a typo in the file path and fixing it has solved the problem.

Another reason that causes this problem is that you’ve set the task to be deleted if it’s not going to be scheduled again. And hence when you try to run the task again the path will not be found since the task has been deleted. In order to avoid this you need to set expiration time of the trigger at least 1 min ahead of the starting time of the trigger.

How to fix the problem

The fix is almost similar to 2147942403 as mentioned below.

  • Right click on the task and click on properties.
  • Hit the settings tab and check the last option that says ‘if the task is already running
  • Then the following rule applies’ and from the drop down menu you should set as ‘stop the existing instance’.

Second fix

Another way to fix this is to just recreate the schedule task again. Since this error is generated due “folder not found”, recreating the task will create a new folder if the previous one is missing. Even if the folder for the failed task exists, delete it and create a new one.

These are the two effective ways to get rid of this error code.

Task Scheduler 2147942403

You should understand that 2147942403 is the same 0x80070003 in hex value and it means that system is unable to find the specified path. The path that’s saved in task scheduler folder couldn’t be found and hence you receive the message ‘ERROR-PATH NOT FOUND’ which means the system couldn’t locate the path to the given task.

Possible fixes

  1. Open windows task scheduler; control panel > administrative tools > Task scheduler,
  2. You should Delete SmartFTP task folder that’s located in task scheduler
  3. Restart the SmartFTP.

Most of the time the problem will be solved by applying this fix.

Second fix

Another fix is by changing task scheduler settings;

Open task scheduler > click on scheduled job properties > click on settings, There are options listed and you need to take a look at the one that says, ‘if the task is already running, the following rule applies’, in the drop-down options you should select ‘stop the existing instance’, Click save and then exit the window. Go back now and check to see whether your task is running or not. Following the two methods will help you fix task scheduler error 2147942403. Let’s now move to the next error code.

Conclusions:

We’ve now reached the end of the article and if you have any other suggestions that have worked for you regarding these three error codes namely: 2147942403, 2147942402, and 2147942401. Please drop a comment for our readers to learn how to fix the problem. Let us know if the fixes shared here have worked for you or not.

  • Remove From My Forums
  • Question

  • We’re using a physical installation of Windows Server 2019 Standard at a French location. The server is working normally. Task Scheduler is used for a small number of tasks. One of the tasks runs a CMD-file daily. The CMD-file launches ROBOCOPY which creates
    log files. The task runs successfully, since the log files are created. However, the «Action completed» event in the Task History always shows a return code of 2147942402.

    From Google searches of this return code, it translates to «file not found». But that’s not the case here, since the task runs and Robocopy creates its log files.

    If I launch the CMD-file inside a VBS wrapper, Robocopy runs, the log files are created, and the return code is 0.

    What does the 2147942402 return code really mean? How can it be avoided without resorting to a VBS wrapper?

    regards, AndyA

У меня есть несколько различных запланированных задач, которые настроены для запуска некоторых исполняемых файлов, написанных в VB.Net. Когда они запускаются, они почти всегда получают сообщение об ошибке, в котором говорится, что задача не запустилась, и ссылаются на это значение ошибки:

Дополнительные данные: Значение ошибки: 2147942402

Как я могу это исправить?

2012-08-08 13:15

7
ответов

Я получаю то же сообщение об ошибке. Как указано в этом другом ответе, оказывается, что код ошибки 2147942402 на самом деле означает File Not Found,

Я создавал свою запланированную задачу программно, и оказалось, что у меня была опечатка в пути к исполняемому файлу, который я указывал для запуска, и его на самом деле не было. После того, как я исправил путь к файлу exe, для которого было запланировано выполнение запланированной задачи, все работало как положено.

2018-02-09 22:41

У меня была такая же проблема, когда я пытался запустить веб-страницы с IE с помощью планировщика Windows.

Следуй этим шагам:

-Нажмите правой кнопкой мыши на вашу задачу -> свойства.

-Нажмите вкладку «Настройки», найдите «Если задача уже запущена, то применяется следующее правило», должно быть в нижней части диалогового окна, и установите значение DropDownList «Остановить существующий экземпляр».

— Нажмите вкладку «Действия», отредактируйте задачу, в разделе «Программа / сценарий» выберите » Полный путь» приложения, в котором выполняется ваша задача (в моем случае я заменил iexplore.exe на C:Windowswinsxs…iexplore.exe).

Надеюсь, это поможет вам:-)

2017-04-26 15:51

Я получил те же Дополнительные данные: Значение ошибки: 2147942402. Для меня решение, которое работало, состояло в том, чтобы удалить задачу и создать новую, ту же самую, которая была удалена. Вы также можете попытаться подтвердить пароль пользователя, когда задание запущено.

2015-02-04 07:54

Изменение разрешений, разных файлов или местоположений мне не помогло. Мне пришлось создать совершенно новую задачу и отключить старую, и у меня это сработало. Что-то должно быть повреждено с исходной задачей.

2018-08-20 16:16

Я столкнулся с той же проблемой при выполнении команды на удаленном сервере. Я исправил проблему, включивcmd /cперед командой.

Команда, для которой я получил ошибку:

      <filepath> <command to run>

Исправление, которое решило проблему.

      cmd /c <filepath> <command to run>

2023-02-12 03:57

Я получал эту ошибку при запуске пакетного файла в качестве запланированной задачи. Мое действие с задачей указывало на пакетный файл и выполнялось успешно, но сообщало о рабочем коде 2 и следующих деталях.

      Task Scheduler successfully completed task...., action "C:WindowsSYSTEM32cmd.exe" with return code 2147942402

Я исправил это, изменив окончательный код выхода на:

      exit 0

Обязательно перехватывайте и обрабатывайте ошибки в пакетном файле. Если пакет выполняется успешно, измените «выход» на «выход 0» . Теперь результатом планировщика задач является «Операция успешно завершена (0x0)» .

2022-08-02 20:08

Я исправил эту ошибку, изменив «Запускать независимо от того, вошел ли пользователь в систему или нет» на «Запускать только, когда пользователь вошел в систему» ​​на вкладке «Общие» задачи.

Вы должны иметь действующего пользователя на вкладке «Общие» -> параметры безопасности -> «При запуске задачи используйте следующую учетную запись пользователя:»

2021-09-10 19:48

Понравилась статья? Поделить с друзьями:
  • Планар 4 киловатта коды ошибок 24 вольта
  • Плазма power max 105 ошибки
  • Планировщик заданий коды ошибок
  • Плазма pioneer коды ошибок
  • Планар 4 квт таблица ошибок