Automate Backup Database on SQL Server, Part 2: Create Scheduled Task

This entry is part 2 of 2 in the series Automate Backup Database on SQL Server

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.

Step-by-step to create scheduled task

  1. Open Scheduled Task. Start -> Programs -> Accessories -> System Tools -> Scheduled Task.
  2. Double-click on Add Scheduled Task to create a new task schedule.
    Create Scheduled Task
  3. On Scheduled Task Wizard, click Next.
    Scheduled Task Wizard
  4. On Select Program to Run, click Browse and select the VB script file.
    Browse to VB Script
  5. Define name of the task and select when to perform the task. In this example, I want to backup daily. Click Next.
    Select Daily
  6. Select time to run this task. I set to 1:00 AM every day. Click Next.
    Set Time
  7. 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.
    User Account
  8. Click Finish to complete creating a task schedule.
    Finish Create Task Schedule
  9. 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.
    Task Schedule
Series Navigation<< Automate Backup Database on SQL Server, Part 1: Create VB Script

Leave a Reply
