Create 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:

  1. Part I: Create VB Script
    In this part, I’ll create create a VB Script for backup database.
  2. 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

  1. Open Scheduled Task. Start -> Programs -> Accessories -> System Tools -> Scheduled Task.
  2. Double-click on Add Scheduled Task to create a new task schedule.
    Add 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
Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • Slashdot
  • Technorati
  • Google Bookmarks
  • Live
  • MSN Reporter
  • RSS
  • Twitter
  • email
  • Facebook
  • Netvibes
  • PDF
  • Yahoo! Buzz

Related post