I’m working on an administration application where system admins can schedule an outage. In order to make the outage happen I need to run a simple update statment on a single table. The problem is that I want them to be able to log in at lets say 12PM and schedule an outage at 9PM, so that we don’t have to have staff online to do this.
Is there some kind of built-in way in SQL Server to schedule an update stmt like this?
Ideally my admin web app would be able to invoke something on SQL Server and say run this at 9PM and not before, otherwise I know I can create a thread and timer to run the update in my webapp but that idea just makes me cringe…
Thanks in advance.
Chris
I think you might be looking for the SQL Server Agent.
You can use it to do pretty much anything you like – run a backup plan, call a stored procedure, etc.
This documentation should give you the pointers you need to get started, and specifically this explains how to create a job.