Scheduling the Batch Job


Now that you have a batch file that calls the regular_dw.sql script, you can proceed with scheduling it with Windows Scheduled Task. The following provides step-by-step instructions on how to do it.

  1. Open your Control Panel and select Scheduled Tasks.

  2. Click Select Add Scheduled Task. The first screen of the Scheduled Task Wizard will appear, as shown in Figure 9.1.

    image from book
    Figure 9.1: The first window of the Scheduled Task Wizard

  3. Click Next. You will see the second window of the Scheduled Task Wizard. Locate Command Prompt from the Application list. Figure 9.2 shows the window after you select the application to be scheduled.

    image from book
    Figure 9.2: Selecting an application to schedule

  4. Click Next again, you will see the third window of the Scheduled Task Wizard, as shown in Figure 9.3. Type in “DW Regular Load” as the name of the scheduled task and select Daily from the “Perform this task:” option list.

    image from book
    Figure 9.3: Entering a name and select a schedule

  5. Click Next again and you will see the next screen that prompts you to select a time for invoking the scheduled task, as shown in Figure 9.4.

    image from book
    Figure 9.4: Setting the time

  6. Click Next again. The next window appears, as shown in Figure 9.5. You will be asked to enter the name and password of the user whose credentials will be used to run the task.

    image from book
    Figure 9.5: Entering Windows user name and password to run the task

  7. Click Next. The next window in the Scheduled Task Wizard appears, as shown in Figure 9.6.

    image from book
    Figure 9.6: The next window

  8. Enable the Open advanced properties for this task when I click Finish check box and click Finish.

  9. The Advanced Properties window will appear, as shown in Figure 9.7.

    image from book
    Figure 9.7: The Advanced Properties window

  10. . Click the Browse button and browse the file system and select the dw_regular_load.bat file.

  11. . Click the Set password button and you will see the Set Account Information box similar to Figure 9.8. Type in your user name and password and click OK.

    image from book
    Figure 9.8: Setting account information

    The daily scheduled task of your data warehouse regular load is now set up. It will start to run at the date and time you specified. You can see a new icon in the Scheduled Tasks window, as shown in Figure 9.9.

    image from book
    Figure 9.9: Your DW Regular Load task



Dimensional Data Warehousing with MySQL. A Tutorial
Dimensional Data Warehousing with MySQL: A Tutorial
ISBN: 0975212826
EAN: 2147483647
Year: 2004
Pages: 149

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net