Chat now with support
Chat with Support

Toad Data Point 5.5 - User Guide

Troubleshooting Scheduled Automation Scripts

Summary

If your Automation script doesn’t run when scheduled, use the following troubleshooting tips to identify and correct any problems. Learn how to troubleshoot script scheduling and execution issues.

In this topic you will learn:

  • How to use the Job Manager to troubleshoot issues with scheduled Automation scripts.
  • How to use the Windows Task Scheduler to troubleshoot scheduled Automation script issues.
  • How to use Automation script logs and error emails to troubleshoot script execution issues.

Watch Troubleshooting Scheduled Automation Scripts to see a video presentation of this tutorial.

Scheduled Scripts Running in Toad Intelligence Central

Some troubleshooting methods described here do not apply to scripts scheduled and executed on an Intelligence Central server. In Intelligence Central, scripts are scheduled using the Scheduler component, not Windows scheduler tasks. See Troubleshoot Scripts on Intelligence Central for additional help with scripts running in Intelligence Central.

If your scheduled Automation script runs on an Intelligence Central server and executes a macro-enabled Excel file, see Using Macro-Enabled Excel Files for more information.

Introduction

Toad allows you to schedule an Automation script. Scripts are scheduled and managed from the Job Manager. You can automatically send your script file name and other information to the Job Manager by clicking Schedule in the Wizard bar.

When you schedule an Automation script in Toad, a Windows scheduled task is created. You can also manage an Automation script as a scheduled task from the Windows Task Scheduler.

Running Automation Scripts on a Server

If you run Toad Data Point on a server and run scheduled Automation scripts, you must log-in and create connections once.

  1. Log-in under the account used to schedule the scripts.
  2. Launch Toad Data Point.
  3. Start each connection (used in the scripts) one time.

General Troubleshooting Tips

Disable Prompts

The instance of Toad used to run a scheduled script must be able to launch unattended. Disable any prompts that display on initial launch of Toad and also require user interaction to close.

Troubleshoot Using Error Email

If your script runs, but there is an error during execution, you can instruct your script to send you an email notification. It is a good idea to configure this option for all your scripts.

  1. To instruct a script to send an email on error, open the script and click the Settings icon in the design window.
  2. Select the Send email when an error occurs option in the Activity Input tab.

Troubleshoot Scripts Using the Job Manager

Note: This method does not apply to scripts running in Toad Intelligence Central. See Manage Automation Scripts in Intelligence Central for more information.

To begin troubleshooting your script, open the Job Manager and review the script properties.

Open Job Manager

  1. Select Tools | Administer | Job Manager.
  2. In the Job Manager window, in the Windows Tasks tab, select the checkbox for the appropriate server/computer. Then locate your task in the Task List tab.
  3. Review the Last Result column.
    • A green checkmark icon in this column indicates the task ran without issue.
    • Other icons indicate that the scheduled task failed or did not run.

Note: To configure options for the Job Manager, see General Job Manager Options and Advanced Job Options.

View Task Properties

  • Double-click the task in the Task List tab to open the task properties dialog. You can use this dialog to review or configure task settings and to modify the task schedule (Triggers tab).

Ensure Task Runs When Logged Off

  • In the task properties dialog, in the General tab, select the Run whether user is logged on or not option. This ensures that Toad will run even if you are logged off.

Ensure Task Runs on Weekends

If you scheduled a script to run daily, and you find that the script is not running on the weekends, try this workaround.

  1. In the task properties dialog, select the Triggers tab. Select the scheduling trigger for this task and click Edit.
  2. In the Settings section, select Weekly.
  3. In the weeks on field, select each and every day of the week. This ensures that the task runs each day of the week, including Saturday and Sunday.

Instruct Windows to Wake to Run Script

Use this tip to wake the computer from a power-saving mode to run your scheduled task.

  1. In the task properties dialog, select the Conditions tab.
  2. Under Power, select Wake the computer to run this task.

Update Windows Password

Depending on your version of Windows, if you changed your Windows password, you may also need to update the password in each of your scheduled tasks.

  1. In the Job Manager, click .
  2. Select the tasks to update and click OK.
  3. Enter your new password when prompted.

Troubleshoot Scripts Using the Windows Task Scheduler

Note: This method does not apply to scripts running in Toad Intelligence Central. See Manage Automation Scripts in Intelligence Central for more information.

If the preceding tips did not correct the issue and your script still does not run when scheduled, you can use the Windows Task Scheduler to check for other task-related issues.

Open Windows Task Scheduler

  1. To open the Windows Task Scheduler, from the programs menu (Start | All Programs) select Accessories | System Tools | Task Scheduler.
  2. In the Task Scheduler window, select the Task Scheduler Library node in the left pane to display the list of scheduled tasks in the right pane.
  3. Select a task in the list to display task details in the bottom pane (or double-click the task to open the task Properties dialog).

Tip: Click Refresh in the Actions pane to refresh the window after adding or deleting scheduled tasks using Toad.

Review Error Codes

  • If your script errors, Toad returns an error code, which displays in the Last Run Result column in the Task Scheduler window.

    Review the following error codes for more information.

    Error Code Description
    0x0 The script executed successfully.
    0x3E7

    There was an error during script execution and the script terminated.

    Decimal equivalent: 999.

    0x6F

    There was an error during script execution and the script continued to run.

    Tip: If the script continued on error, one of the following settings is specified in the script:

    • The Continue On Error option is selected for the script.
    • The Stop on error option is deselected for an activity.

    Decimal equivalent: 111

    0x22B

    The Trial license key for this instance of Toad expired. Enter a Commercial license key.

    Decimal equivalent: 555

    other Error codes other than those described above, indicate that the script did not start. For example, if the path to Toad is incorrect in the scheduled task, then the script will not start.

Confirm Toad Application and Script File Locations for a Task

Confirm that the path to the Toad executable and the path to the script file are correct.

  1. In the Task Scheduler window, double-click the task to open the task Properties dialog.
  2. Select the Actions tab.
  3. Double-click the Start a program action to open the Edit Action dialog.
  4. In the Program/script field, make sure that the path to the Toad executable is correct, and that the path points to the correct version of Toad.
  5. In the Add arguments field, make sure that the script path and script file name are correct.

Configure Task Scheduler to Send Email on Error

In some versions of Windows, you can configure the Task Scheduler to send an email if your scheduled task doesn't run.

Note: This allows you to receive email notification if the task doesn't run as scheduled. To receive email notification of an error during script execution, specify this option within your Automation script. See Troubleshoot Using Error Email for more information.

  1. To set up an email trigger, in the Task Scheduler window, double-click the task to open the task Properties dialog.
  2. On the General tab, in the Configure for field, select Windows 7.
  3. Select the Triggers tab and click New to add a new trigger.
  4. In the Begin the task field, select On an event from the drop-down list.
  5. In the Log field, select Microsoft-Windows-TaskScheduler/Operational.
  6. In the Source field, enter TaskScheduler as the source of the trigger.
  7. In the EventID field, enter 203 which specifies the type of event as an error. Click OK.
  8. Now, select the Actions tab and click New to add a new action.
  9. In the Action field, select Send an e-mail from the drop-down list, and then configure the email settings.

Troubleshoot Using Automation Script Logs

If your script runs, but there is an issue during execution, you can review the script log to help identify the issue.

  1. To view script logs, in Toad select Help | About and click the Application Data Directory link in the About box to open the directory.

    Note: For scripts running in Intelligence Central, open the Script Manager. See Manage Automation Scripts in Intelligence Central.

  2. Open the Automation folder and select the log file for your script. Review the log and identify at which step the error occurred.
  3. If you need more details in the log, you can specify this in the settings of your Automation script.
    1. Open your Automation script in Toad.
    2. Click the Settings icon in the Automation design window.
    3. In the Activity Input tab, in the Logging level field, select Verbose. This instructs Toad to create a more detailed log.

    Note: If you use the Verbose option, Toad generates an additional log file just for email errors. The name of this log file is MailBee_<number>.txt and it can provide you with information about your email errors.

  

Related Topics

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating