Thor Logo dbatools

Schedule

Get-DbaAgentSchedule

Chris McKeown (@devopsfu), devopsfu.com

Get-DbaAgentSchedule View Source Chris McKeown (@devopsfu), devopsfu.com Windows, Linux, macOS Synopsis Retrieves SQL Agent shared schedules with detailed timing and recurrence information. Description Retrieves all shared schedules from SQL Server Agent along with human-readable descriptions of their timing patterns. These shared schedules can be reused across multiple jobs to standardize maintenance windows and reduce schedule management overhead. The function provides filtering options by schedule name, unique identifier, or numeric ID, making it useful for schedule auditing, documentation, and troubleshooting automated job execution patterns.

Read more

Remove-DbaAgentSchedule

Sander Stad (@sqlstad), sqlstad.nl

Remove-DbaAgentSchedule View Source Sander Stad (@sqlstad), sqlstad.nl Windows, Linux, macOS Synopsis Removes SQL Server Agent schedules from one or more instances. Description Removes SQL Server Agent schedules from the msdb database, handling both unused schedules and those currently assigned to jobs. The function first removes schedule associations from any jobs using the schedule, then drops the schedule itself to prevent orphaned references. Use this when cleaning up unused schedules during maintenance, consolidating multiple schedules, or removing schedules as part of job reorganization.

Read more