Isolating Sitecore Scheduled Tasks to Specific Environments
> Useful for database refreshes
![Cover Image for Isolating Sitecore Scheduled Tasks to Specific Environments](/_next/image?url=%2Fimg%2Fhero%2Ftraffic-light.jpg&w=3840&q=75)
The Problem
As a complement to my post on database refreshes, I've written a PowerShell script chunk that can be used to isolate Sitecore scheduled tasks to specific environments (assuming that your scheduled task is performed using Sitecore PowerShell Extensions).
This is useful for preventing production-only scheduled tasks from running in downstream environments after a refresh. It saves you the step of having to make manual changes.
The Script
Stay in your lane,
-MG