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:
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
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.
If you run Toad for SQL Server on a server and run scheduled Automation scripts, you must log-in and create connections once.
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.
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.
To begin troubleshooting your script, open the Job Manager and review the script 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).
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.
If you scheduled a script to run daily, and you find that the script is not running on the weekends, try this workaround.
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.
Use this tip to wake the computer from a power-saving mode to run your scheduled task.
Under Power, select Wake the computer to run this task.
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.
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.
Tip: Click Refresh in the Actions pane to refresh the window after adding or deleting scheduled tasks using Toad.
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.
|0x0||The script executed successfully.|
There was an error during script execution and the script terminated.
Decimal equivalent: 999.
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:
Decimal equivalent: 111
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 that the path to the Toad executable and the path to the script file are correct.
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.
If your script runs, but there is an issue during execution, you can review the script log to help identify the issue.
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: 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.