I keep getting error "Incorrect Function" in the Last Runtime Result column of the scheduled tasks.
I have tried tasks of various types, including simple information events to executing scripts with and without script configurations and nothing seems to be working, mind you that these same tasks work fine in another DMA. I have also tried restarting the DMA and the server and nothing.
From checking the logs and doing a follow in the Client Test Tool it seems that it doesn't even get executed. There is also nothing on the logs.
Does anyone have an idea of how to fix this?
Thank you!
Hi Maria,
Can you also check in system center if there are non-existing DMAs? You could end up with a non-existing DMA when the IP address of the DMA was updated.
@Wale
1. No, none of the scheduled tasks that I try to create work on that DMA
2. It’s part of a cluster.
3. Yes, they do appear in the windows task scheduler.
4. Yes they are also present in the schedule.xml
5. Scheduled tasks work well in the other DMA that is part of the same cluster.
Had a chance to dig deeper on the affected agent,
Running the Scheduled task directly from Windows Scheduler also was not successful: This error was logged:
==
Task Scheduler successfully completed task "\Skyline Dataminer Scheduled Task 1" , instance "{32843a8f-c5d3-427b-ade7-b700d0a91f83}" , action "C:\Windows\system32\WScript.EXE" with return code 2147942401.
The error code 2147942401 in Windows Task Scheduler corresponds to 0x80070001, which means "Incorrect function." This error typically indicates that the task failed due to a general problem with the script, program, or command that the task is trying to execute.
==
Issue was wrong file association of the ExecuteScheduledTask.js file which was seen as a Notepad++ document instead of a JavaScript file.
This file is located in 'C:\Skyline DataMiner\Files' and is responsible for executing the scheduled tasks.
Fixing the file association solved the problem. From Command prompt ran the following command:
<assoc .js=JSFile>
For the affected agent:
1) Are you able to run any scheduled task ?
2) Is the agent standalone or part of a cluster ?
3) The tasks you are trying to execute should be listed in Windows task scheduler. Is that the case ?
4) The tasks should also be listed in Schedule.xml file of the agent. Is that the case ?
5) The other DMA where everything works fine, is it in a cluster with this agent ?