October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
AppCmd

How to Schedule IIS Application Pool Restarts

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a recurring IIS restart, schedule a recycle for the relevant application pool. IIS provides this natively through the pool’s periodicRestart settings. You can configure it in IIS Manager or with AppCmd; PowerShell’s Restart-WebAppPool is useful for an on-demand action, but it does not create a recurring schedule.

What “schedule an IIS restart” normally means

Most administrators mean recycling one IIS application pool, not restarting the entire IIS service or Windows server. A pool recycle restarts that pool’s worker process and leaves unrelated pools alone. A full service or server restart has broader impact and is not what the native application-pool schedule configures.

Choose the right method

Method What it does Scope Best use
IIS Manager Recycling settings Creates a native recurring recycle condition, including a specific time One application pool Interactive administration
AppCmd periodicRestart.schedule Writes a native scheduled recycle to IIS configuration One application pool Repeatable scripts and deployment automation
PowerShell Restart-WebAppPool Immediately restarts a named pool One application pool Manual or externally scheduled actions

IIS documents the available periodic recycle conditions, including a schedule, elapsed time, and resource or request thresholds. A particular daily time is a separate choice from those other conditions: Periodic Restart Settings for Application Pool Recycling.

Configure a daily recycle in IIS Manager

  1. Open Internet Information Services (IIS) Manager.
  2. In the Connections pane, expand the server and select Application Pools.
  3. Select the pool that hosts the application.
  4. In the Actions pane, choose Recycling….
  5. In the recycling conditions, enable or add a Specific time.
  6. Enter the time using the server’s local 24-hour clock, such as 03:00:00 for 3:00 A.M.
  7. Apply the setting and verify that the time appears in the pool’s recycling configuration.

Microsoft’s documented workflow and schedule semantics are described in Adding Periodic Restart Schedules <add>. The time is local to the IIS server; do not label it UTC unless that server’s local time zone is UTC.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configure the schedule with AppCmd

Add a 3:00 A.M. schedule to an existing pool

appcmd.exe set config -section:system.applicationHost/applicationPools /+"[name='Contoso'].recycling.periodicRestart.schedule.[value='03:00:00']" /commit:apphost

Replace Contoso with the exact application-pool name and change 03:00:00 to the desired local time. The /commit:apphost switch writes the change to the appropriate IIS ApplicationHost.config location, as shown in Microsoft’s example.

If the pool does not exist

Create the application pool first, then add the schedule entry. Microsoft’s same reference includes the pool-creation form and the schedule command: Adding Periodic Restart Schedules <add>.

Understand the configuration element

The schedule is an item in the pool’s periodicRestart.schedule collection. The element reference is available at Periodic Restart Schedules <schedule>. The broader periodicRestart section documents other recycle triggers at Periodic Restart Settings for Application Pool Recycling.

Use PowerShell for an immediate or externally triggered restart

Import-Module WebAdministration
Restart-WebAppPool -Name "Contoso"

Restart-WebAppPool acts on the named pool at the time the command runs. It does not define a daily or weekly recurrence. If an external scheduler invokes it, configure that scheduler separately and ensure the account has permission to manage IIS. See Microsoft’s cmdlet reference: Restart-WebAppPool.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan for worker-process shutdown behavior

A recycle is not a guarantee of zero interruption. During a recycle, IIS starts and stops worker processes according to the application pool’s process-model limits. Microsoft’s process-model example sets both the shutdown and startup time limits to 30 seconds and states that IIS terminates the worker process if either limit is exceeded: Process Model Settings for an Application Pool.

  • Choose a maintenance time that minimizes user impact.
  • Check how the application handles in-flight requests, background jobs, sessions, and long-running uploads.
  • Do not treat the 30-second values in Microsoft’s example as a universal default or as a promise that every application will restart without failed requests.

Log and verify scheduled recycles

Microsoft’s IIS example sets logEventOnRecycle="Schedule", demonstrating that schedule-triggered recycle events can be logged. That setting is an example configuration, not a universal default. If you need an audit trail, enable the corresponding recycle-event logging for the pool and then check IIS/WAS event records after the scheduled time.

  1. Confirm the pool name and configured local time.
  2. Check that the schedule appears in IIS Manager or the pool configuration.
  3. After the maintenance window, review the application’s health, failed-request logs, and Windows/IIS event records.
  4. If the recycle did not occur, verify the server’s local clock and time zone, the pool’s configuration, and whether another recycle condition or administrative action occurred first.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common mistakes

  • Scheduling the wrong scope: a pool schedule recycles that pool, not every IIS site or the whole server.
  • Using UTC unintentionally: 03:00:00 means 3:00 A.M. in the server’s local time zone.
  • Confusing action with recurrence: Restart-WebAppPool runs once per invocation; it is not the recurring configuration.
  • Forgetting the commit target: the documented AppCmd command uses /commit:apphost so the setting is stored in the application-host configuration.
  • Assuming no interruption: shutdown limits and application behavior determine what users experience during recycling.

Recommended approach

For a normal daily maintenance recycle, configure the application pool’s Specific time in IIS Manager. Use the AppCmd form when you need a repeatable server build or deployment script. Use Restart-WebAppPool only when another process must trigger a one-time restart; keep any recurrence in the scheduler or automation system that invokes it.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.