What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Need help monitoring a Windows Scheduled Task using ScheduledTask2XML

Votes:

0

I downloaded ScheduledTask2XML and moved it into EXEXML under the Custom Sensors and setup a new custom sensor. Under Parameters I put in -c=Servername -t=taskname but I keep getting the error can't find task on this server. Anyone else run into this issue and if so is there a fix for this.

Thanks

custom-task prtg16 scheduled-task scheduledtask2xml server-2008

Created on Apr 1, 2016 12:38:19 PM



12 Replies

Votes:

0

Hi mattsy,

Open a commandline window in the folder where the executable is located and execute it this way: ScheduledTask2XML.exe -c="hostname" -u="domain\username" -p="password" -l (Last parameter is small letter "L")

What result do you get?

Kind regards.

Created on Apr 4, 2016 6:21:12 PM by  Erhard Mikulik [Paessler Support]

Last change on Apr 6, 2016 6:38:38 AM by  Erhard Mikulik [Paessler Support]



Votes:

0

This helped me. The task name needs to have \ in front of it else it won't find it.

Created on Apr 4, 2016 6:30:53 PM



Votes:

0

I'm running into the same issue, here is my command and command line output:

PS D:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML> .\ScheduledTask2XML.exe -c=server.domain.net -t= "\job name" -u=domain\user -p=password -l

16.2.2.3
Check if Remote Registry Service is running.
<?xml version="1.0" encoding="utf-8"?><prtg><error>1</error><text>Cannot open Service Control Manager on computer 'server.domain.net'. This operation might require other privileges.</text></prtg>

I verified the remote registry service is running on the remote PC and that the account I am using is a domain admin so permission 'should' not be an issue.

Created on Jun 9, 2017 2:12:56 PM

Last change on Jun 9, 2017 2:55:44 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Hi there,

Please try to put all parameters into quotes and check if this works:

.\ScheduledTask2XML.exe -c=server.domain.net -t= "\job name" -u="domain\user" -p="password"

Please note that the "-l" switch in the end only should be used when no job name is defined. So both "-t" and "-l" won't work. The parameters "-l" lists all available tasks.

Best regards.

Created on Jun 9, 2017 2:55:31 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

I confirmed that the task name is correct, and provided proper credentials and I receive the following message via command-line on Win2012 R2. Any ideas?

16.2.2.3
Check if Remote Registry Service is running.
Remote Registry Service is running.
<?xml version="1.0" encoding="utf-8"?><prtg><error>1</error><text>The task XML contains a value which is incorrectly formatted or out of range. (Exception from HRESULT: 0x80041318)</text></prtg>

Created on Jun 29, 2017 12:49:18 PM

Last change on Jun 29, 2017 6:28:59 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Hi there,

As the error message states, have you checked that there is no Firewall or Software that could block the network access? If so, then make sure that the Remote Registry Service is started on the target machine.

Best regards.

Created on Jun 29, 2017 6:29:45 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Hi, I have the same issue.

When I use the following command line I get a list of tasks which are in the PC specified. So the parameters must be alright. ScheduledTask2XML.exe -c=servername -t="\path\taskname" -l


Without the "-L" I get the following error: 16.2.2.3 Check if Remote Registry Service is running. Remote Registry Service is running. <?xml version="1.0" encoding="utf-8"?><prtg><error>1</error><text>The task XML contains a value which is incorrectly formatted or out of range. RESULT: 0x80041318</text></prtg>

Best regards

23.08.2017 - Modification small letter of L

Created on Aug 17, 2017 6:25:06 AM

Last change on Aug 23, 2017 10:27:47 AM by  Arne Seifert [Paessler Support]



Votes:

0

Hi Kara,

So when you run "ScheduledTask2XML.exe -c=servername -L" you get the tasks listed? Try adding username and password: ScheduledTask2XML.exe -c=servername -t="\path\taskname" -u="domain\username" -p="password"

Kind regards,

Erhard

Created on Aug 18, 2017 10:33:38 AM by  Erhard Mikulik [Paessler Support]



Votes:

0

Hi Erhard,

thanks for your response.

If I use this row of parameters, with the smaller letter of L, I get the task list, yes ScheduledTask2XML.exe -c=servername -t="\path\taskname" -u="domain\username" -p="password" -l

Without the small letter of L, I get the mentioned error.

Kind regards Kara

Created on Aug 23, 2017 10:14:31 AM



Votes:

0

Dear Kara,

please clarify, does the sensor work as intended with the small-letter l, or are there open questions?

Created on Aug 23, 2017 10:29:32 AM by  Arne Seifert [Paessler Support]



Votes:

1

After lot of tries implementing this type of sensor I noticed that only for some tasks it reported the error.

"<?xml version="1.0" encoding="utf-8"?><prtg><error>1</error><text>The task XML contains a value which is incorrectly formatted or out of range. (Exception from HRESULT: 0x80041318)</text></prtg>"

I've found that this issue occurs only with scheduled tasks that are "Configured for: Windows Server 2012 R2" , changing that option to "Windows7, 2008R2" solved it.

I hope it helps.

Created on Nov 9, 2017 3:10:04 PM

Last change on Jan 1, 2019 7:22:50 AM by  Luciano Lingnau [Paessler]



Votes:

0

I use the sensor to monitor several tasks on the same server All in the same folder, all run with the same user.. Only two of them run into an error: Incorrect function called for 'Task Result'

Is there any way to troubleshoot that?

Created on Sep 21, 2023 10:37:18 AM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.