0

I use SQL Agents tasks to execute my backup, maintenance & ETL tasks.

IT would like to have a regular maintenance window to apply server patches. They're suggesting the 3rd Tuesday of every month outside work hours.

Can I configure jobs to run on every day except that day?

The other option I thought might be possible was to have multiple schedules configured to somehow exclude that day.

  • See this accepted answer here for what appears may be a similar solution to your problem for when NOT to run a scheduled job. You CAN schedule a job to run on the 3rd Tuesday of every 1 month so potentially scheduling a job on this day to disable all SQL Agent jobs then enabling these back if disabled every Wednesday at 12 AM (or the agreed time on Wednesday when maintenance will be done) dba.stackexchange.com/questions/46463/…. Adding logic to each job to check and not run on this day would work as well just as suggested there. – Pimp Juice IT May 14 '16 at 4:36
  • You could have the job that re-enables the other jobs run from another SQL instance or schedule it from that server (or another) with Windows Task Scheduler executing a specific SQL Agent job (yep disabled) using SQLCMD executing sp_start_job – Pimp Juice IT May 14 '16 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.