Toad SQL Server running fine manually, with automated way giving error

Script is running fine when triggering manually. But failing while running through Task Scheduler.

Error Message:
Set_Variable_1 - Object reference not set to an instance of an object.

sometime: If_1 - The following variables are not assigned values:
Count

Count is SQL, how to assigned values to count then

Have you defined a variable named count in your script and set the value? See https://blog.toadworld.com/2013/07/24/toad-data-point-automation-series-blog-12-variables

Debbie, Somehow I am not able to fix this issue. Could you please look into SR Number:4529029. I attached the screenshot there. Hope that will give more information. Please assist in fixing this issue.

Sure. I can look at the support case. Can you send the automation script and any dependent files? Also generate a support bundle from the help menu and send that also. Tell the support person when they get those files to open a subcase and email me when open. I am not normally watching the Toad for SQL Server support cases.