New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Can't see any schedule tasks

Votes:

0

Your Vote:

Up

Down

Hi there,

I'm trying to add a windows schedule task sensor (target device is Windows 2012 R2) but I can't see any of the scheduled tasks jobs listed on prtg sensor. I have got: "No Task Name available".

Thanks

scheduled-task sensor tasks

Created on Jul 2, 2015 4:01:51 AM by  federicogomez (0) 1



Best Answer

Accepted Answer

Votes:

8

Your Vote:

Up

Down

Created on Sep 16, 2016 12:59:14 PM by  Markus (321) 2 1



9 Replies

Votes:

0

Your Vote:

Up

Down

Please check the Remarks of the Windows Scheduled Task Sensor.

Also note the following requirements:

  • Requirement: .NET Framework 4.0
  • Requirement: Remote Registry Service
  • Requirement: Windows Credentials
  • Requirement: Monitored Operating Systems

After going through the remarks and requirements, try creating the sensor anew.


Important note: The Windows Scheduled Task sensor is deprecated as of PRTG version 16.1.23.

Please see the following article for more details and possible alternatives:

Created on Jul 3, 2015 10:02:23 AM by  Luciano Lingnau [Paessler Support]

Last change on Mar 22, 2016 4:55:12 PM by  Gerald Schoch [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi there,

All the requirements have been met but still having issues. The only thing we do not have installed in our probe is .NET 3.5. Would it make a difference?

Thanks

Created on Jul 5, 2015 11:02:41 PM by  federicogomez (0) 1



Votes:

0

Your Vote:

Up

Down

Hello federicogomez,

You can try to run the script manually and check the results:

Within the command line prompt in the PRTG Probe/Server navigate to C:\Program Files (x86)\PRTG Network Monitor\Sensor System, from there, run the following:

ScheduledTaskXML.exe -c=monitoreddevice.domain -l -u=domain\user-p=password

Please update the monitoreddevice.domain, domain\user and password to your actual environment.

If the script succeeds, try running the PRTG Service under a different account or check the account provided within PRTG on the CREDENTIALS FOR WINDOWS SYSTEMS on the device where you're trying to add the sensor.

Created on Jul 6, 2015 12:20:20 PM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi,

I have run the script as the PRTG service account (who is a member of the domain admins group) and got the following message:


The following feature couldn't be installed: .NET Framework 3.5 (includes .NET 2.0 and 3.0)


Cheers,

Created on Jul 6, 2015 8:21:52 PM by  federicogomez (0) 1

Last change on Jul 8, 2015 6:38:59 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello,

In that case please additionally install .NET 3.5 on the PRTG Probe Server that will hold the created sensor.

Best Regards,

Created on Jul 7, 2015 1:12:42 PM by  Luciano Lingnau [Paessler Support]

Last change on Jul 8, 2015 6:40:01 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

After installing .Net 3.5 in the local site probe it worked OK.

Thanks a lot for you help.

Regards

Created on Jul 8, 2015 12:43:22 AM by  federicogomez (0) 1

Last change on Jul 8, 2015 6:38:01 AM by  Luciano Lingnau [Paessler Support]



Accepted Answer

Votes:

8

Your Vote:

Up

Down

Created on Sep 16, 2016 12:59:14 PM by  Markus (321) 2 1



Votes:

0

Your Vote:

Up

Down

Thanks a lot Markus for the contribution! Can I ask you for one thing? Correcting the type in the first part of your article Peassler should be Paessler

Created on Sep 16, 2016 1:11:51 PM by  Torsten Lindner [Paessler Support]



Votes:

1

Your Vote:

Up

Down

Hello

Unfortunately when I needed your script, I didn't find it Markus, I wrote mine which is simpler than yours. It targets a specific scheduled task. In case it would be helpful here it is

param(
	[string]$computerName,
	[string]$scheduledTaskName,
	[string]$scheduledTaskPath
)

$session = New-PSSession -computerName $computerName -Authentication Kerberos 

$scriptBlock = {
	param(
		$scheduledTaskName,
		$scheduledTaskPath
	)
    $taskStatus = Get-ScheduledTask -TaskName $scheduledTaskName | select -ExpandProperty state
    $taskExecution = Get-ScheduledTaskInfo -TaskName "$scheduledTaskPath\$scheduledTaskName" | select LastRunTime, NextRunTime, LastTaskResult
	$date = date
	
	switch ($taskStatus){
		"Ready" {$taskStatus = 1}
		"Disabled" {$taskStatus = 2}
		"Running" {$taskStatus = 3}
	}

	$LastRunTime = $date - $taskExecution.LastRunTime
	$LastRunTime = $LastRunTime.hours
	$NextRunTime = $taskExecution.NextRunTime - $date
	$NextRunTime = $NextRunTime.hours

	
    $result= "<?xml version=`"1.0`" encoding=`"Windows-1252`" ?>`r`n"
    $result+="<prtg>`r`n"

	
    $result+="   <result>`r`n"   
    $result+="   	<channel>State</channel>`r`n"
	$result+="      <Unit>custom</Unit>`r`n"		
	$result+="      <CustomUnit>(1=Ready; 2=Disabled; 3=Running)</CustomUnit>`r`n"	
    $result+="      <value>$taskStatus</value>`r`n"
    $result+="   </result>`r`n"
	
	
    $result+="   <result>`r`n"   
    $result+="      <channel>LastRunTime</channel>`r`n"
	$result+="      <Unit>TimeHours</Unit>`r`n"		
    $result+="      <value>$LastRunTime</value>`r`n"
    $result+="   </result>`r`n"

    $result+="   <result>`r`n"   
    $result+="      <channel>NextRunTime</channel>`r`n"
	$result+="      <Unit>TimeHours</Unit>`r`n"		
    $result+="      <value>$NextRunTime</value>`r`n"
    $result+="   </result>`r`n"

    $result+="   <result>`r`n"   
    $result+="      <channel>LastTaskResult</channel>`r`n"
	$result+="      <Unit>custom</Unit>`r`n"		
	$result+="      <CustomUnit>(0=Okay)</CustomUnit>`r`n"	
    $result+="      <value>$($taskExecution.LastTaskResult)</value>`r`n"
    $result+="   </result>`r`n"

    $result+="   <text>OK</text>`r`n"
    $result+="</prtg>`r`n"
	$result
}

Invoke-Command -computerName $computername -scriptBlock $scriptBlock -ArgumentList $scheduledTaskName, $scheduledTaskPath		
Remove-PSSession -computerName $computername
Exit 0

Created on Jan 16, 2018 7:48:11 AM by  Yann (300) 1 1

Last change on Jan 16, 2018 8:17:31 AM by  Luciano Lingnau [Paessler Support]



Please log in or register to enter your reply.


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.