Toad World® Forums

execute script task within an automation seems to not exit and move onto the next task


#1

Hi,

We have automations which we schedule in windows scheduler that do very basic work:

  1. export data from a database

  2. import the data into a table

  3. execute a script to manipulate the data

Between steps 1 and 2 and between steps 2 and 3 we have a simple execute script which does nothing more than write a log entry to a table that we use to monitor our nightly scheduled automations.

The execute scripts are calling a PL/SQL procedure that are passed the task name, the time, and the task status (running or complete). The procedure has embedded commits.

Here is the basic PL/SQL that calls the procedure:

exec log_data(‘pta clinical events cqi merge’,‘End Success’,sysdate, 0, ‘completed’);
commit; --commit was added trying to fix this problem – log_data has commits that are executed.
exec log_data(‘pta driver create’,‘Running’,sysdate, 0, null);
commit; --commit was added trying to fix this problem – log_data has commits that are executed.

What is happening is the execute script that is responsible for writing the log entry is working fine – we see the log entry in the table – but at that point the automation does not go onto the next step. Usually – but not always - the next step is an import.

We are not using data point and this only happens in windows scheduler. We can run the automation manually with 100% success.

Some background: we recently moved to windows server 2016 and are running TOAD 12.12.0.39. This has never happened before (i.e., when we were running on windows server 2008 with previous versions on TOAD).

This seems to be intermittent. However, when we first migrated over it was happening with every execute script. We found - by accident - a strange workaround where all we had to do was add any valid oracle statement at the end of the execute script (e.g., select * from dual;) and they would not freeze. Though this seemed to work at first, we still see this strange problem seemingly at random.

That is, some nights the automations all run fine, and other nights they freeze up.

The windows scheduler is not helpful. Though it knows something is amiss - we see an error code 0x1 - we cannot find any good documentation on what this error means nor can we find any error messages or log entries anywhere.

We’ve tried discarding output, failing the action and writing to a log, all to no avail. Its like it simply stops without moving onto to the next action.

Any help would be appreciated!

Thanks


#2

If you haven’t already, let’s open up a Support case for this. There’s too many moving parts/factors to this issue for it to be adequately serviced efficiently in a forum like this, not to mention that Support can document it all.


#3

We finally were able to find an actual error message in task scheduler.

The message stated that the clipboard was unavailable. We apparently are not using Toad as intended by scheduling multiple automations at night. The default execute script action is to write to the clipboard. In those cases where two or more execute scripts happen to run at the exact same time the clipboard is locked and one of the scripts fail. This failure does not trigger the fail action event though.

We simply changed our execute tasks to discard output.

We have found the ability to write to the clipboard useful at times but we wonder why this is the default action in an execute script task? Sometimes when scripts are running in the background and we are working in Toad, when we copy and paste work we find the paste grabs gibberish from the clipboard. Gibberish created by execute tasks writing to the clipboard by default.