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

Maintenance schedule once per two weeks or more



Is it possible to schedule a maintenance plan wich occurs every two weeks, three weeks, once a month, etc. in stead of every single week?

maintenance schedule weekly

Created on Jul 28, 2014 2:25:49 PM

3 Replies

Accepted Answer



Not by default :) You'll need to use scheduled tasks and run the following script with some parameters. Save it as Set-Maintenance.ps1 to any path you want:

param([int]$Id,[int]$Duration = 1,[string]$Unit = "Hours")

$Server		= "your-prtg-server-url-or-dns"
$User   	= "your-username"
$Hash   	= "your-passhash"
$DateFormat     = "yyyy-MM-dd-HH-mm-ss";
$StartDate 	= (Get-Date).ToString($DateFormat);

	"Minutes" 	{ $EndDate = (Get-Date).AddMinutes($Duration).ToString($DateFormat); }
	"Hours"		{ $EndDate = (Get-Date).AddHours($Duration).ToString($DateFormat); }
	"Days" 		{ $EndDate = (Get-Date).AddDays($Duration).ToString($DateFormat); }
	default 	{ $EndDate = (Get-Date).AddHours($Duration).ToString($DateFormat); }

Invoke-WebRequest "http://$Server/api/setobjectproperty.htm?id=$Id&name=Inheritscheduledependency&value=0&username=$User&passhash=$Hash" | out-null
Invoke-WebRequest "http://$Server/api/setobjectproperty.htm?id=$Id&name=maintenable&value=1&username=$User&passhash=$Hash" | out-null
Invoke-WebRequest "http://$Server/api/setobjectproperty.htm?id=$Id&name=maintstart&value=$StartDate&username=$User&passhash=$Hash" | out-null
Invoke-WebRequest "http://$Server/api/setobjectproperty.htm?id=$Id&name=maintend&value=$EndDate&username=$User&passhash=$Hash" | out-null

Modify the script with your server details, username and password. Create a new scheduled task that runs on the days or months you need and run it with the following parameters:

-Duration 1 -Unit Hours -Id 1234 Duration The duration as number
Unit Can be minutes,hours or days. It's hours by default.
Id The ID of the sensor, device or group you want to pause

Created on Jul 30, 2014 7:57:32 AM by  Stephan Linke [Paessler Support]

Last change on Jul 30, 2014 7:58:24 AM by  Stephan Linke [Paessler Support]



Thanks for your answer. It looks like it works!

Is it already requested as a new feature in future releases of PRTG? If not, I'd like to request it right now :).

Created on Jul 30, 2014 8:32:06 AM



I would like to add my +1 to requesting a monthly option for scheduling, rather than the current weekly only. In the meantime, I'll try using this Powershell script.

Created on Mar 3, 2015 6:47:39 PM

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.