Automate Backup Database on SQL Server, Part II: Create Scheduled Task
Administration, Windows February 2nd, 2009Create a Scheduled Task
From the previous part, I have created a VB Script that perform backup database task on SQL Server. Next, create a task schedule to execute the script on the specific time as I want. I want the script to be executed every day at 1:00 AM.
The article is divided into 2 parts:
- Part I: Create VB Script
In this part, I’ll create create a VB Script for backup database. - Part II: Create Scheduled Task
This is the part which you’re reading show how to create a task schedule to execute the VB Script on scheduled time.
Step-by-step
- Open Scheduled Task. Start -> Programs -> Accessories -> System Tools -> Scheduled Task.
- Double-click on Add Scheduled Task to create a new task schedule.

- On Scheduled Task Wizard, click Next.

- On Select Program to Run, click Browse and select the VB script file.

- Define name of the task and select when to perform the task. In this example, I want to backup daily. Click Next.

- Select time to run this task. I set to 1:00 AM every day. Click Next.

- Enter the username and password. The task will be run by this user account. If you create a VB Script that using Windows Authentication mode, you have to enter the account that has backup privilege on the SQL Server.

- Click Finish to complete creating a task schedule.

- The task schedule has been created. Now when the time is 1:00 AM, the task will be run as the user account that you’ve spcified in the task schedule.

Related post
- Automate Backup Database on SQL Server, Part I: Create VB Script Introduction Last year, I wrote an article about backup and restore database on SQL Server with Microsoft SQL Server Management...
- [Solved] System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing ‘dbName’ database Problem You have backup a database on SQL Server 2005. Then, you try to restore the backup file on an...
Related posts:



