Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


jswidorski
2012-11-14T20:00:15Z
I am creating a set of excel files through vbscript.

When I run manually everything is great, when I run through the scheduler, the job aborts.

I am creating 1400 rows in the excel file when the job stops. I notice under task manager that the cpu for excel is super high 85-90% when the job stops. The job has actually create 3 excel files prior to stopping. Each with rows of 65, 70, and 5.

I create a new excel object on each loop through, as well as closing that terminating the object.

Set objExcel = CreateObject("Excel.Application")

...
...

objExcel.Application.Quit
set objExcel = Nothing

Any thoughts on this? I have not had problems in the past with other jobs that create excel, and 1400 rows does not seem that large.

Thanks.
Sponsor
Forum information
Support
2012-11-14T22:08:15Z
I think there is some general problem, maybe related to the user it runs as (Credential). I suggest that you write "debug lines" in the code to see where the script fails and then come back to us.

You should also try to create a Credential (same user as you are logged in as) with local logon=true and load profile=true and set that Credential in that Task to see if it helps.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jswidorski
2012-11-15T13:48:18Z
Does VC shut down a job if the CPU touches 100%? I am running my job through the command line right now, and the CPU is running at at 100%. My wscript.exe is around 10% and the excel.exe *32 is running in the 90% area.

I have other jobs fire off excel and they too (excel) run at a very high cpu level.

Support
2012-11-15T13:49:10Z
No, it does not shut down.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jswidorski
2012-11-15T14:59:51Z
I put in some debug statements and it is just stopping in the middle of loading cells in excel.

while NOT rsDetail.EOF
if bDebug then objTextFile.WriteLine("Entered Detail ")

intRowCount = intRowCount + 1

objWorksheet.Cells(intRowCount, 1) = rsDetail("QUOTE DATE")
objWorksheet.Cells(intRowCount, 2) = rsDetail("AGENT")
objWorksheet.Cells(intRowCount, 3) = rsDetail("FIRST")
objWorksheet.Cells(intRowCount, 4) = rsDetail("MIDDLE")
objWorksheet.Cells(intRowCount, 5) = rsDetail("LAST")
objWorksheet.Cells(intRowCount, 6) = rsDetail("INSAD1")
objWorksheet.Cells(intRowCount, 7) = rsDetail("INSCTY")
objWorksheet.Cells(intRowCount, 😎 = rsDetail("INSST")
objWorksheet.Cells(intRowCount, 9) = rsDetail("INSZIP")
objWorksheet.Cells(intRowCount, 10) = rsDetail("DAY TELEPHONE")
objWorksheet.Cells(intRowCount, 11) = rsDetail("POLICY")
objWorksheet.Cells(intRowCount, 12) = rsDetail("GROUP")

for i = 1 to 12
objWorksheet.Cells(intRowCount, i).Font.Size = 10
next

set objRange = objWorksheet.UsedRange
objRange.EntireColumn.Autofit()

rsDetail.MOVENEXT
if bDebug then objTextFile.WriteLine("Exited Detail ")
wend
Support
2012-11-15T15:02:20Z
If you run this Task as a Foreground Task (main settings of Task) - does it work then?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jswidorski
2012-11-15T15:05:16Z
I get a message

The application was unable to start correctly (0xc0000142).
Support
2012-11-15T16:01:03Z
When using Foreground execution try deselecting the Credential.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jswidorski
2012-11-15T19:22:17Z
Same problem with VC runs it...

If I run from Windows Explorer, it runs through.
Support
2012-11-15T19:35:38Z
Really hard to say without the environment here. Find it strange that it crashes in the middle, especially with that kind of error. Normally that error means that the process cannot be started and it is not something that happens in runtime.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
jswidorski
2012-11-15T19:59:09Z
VC has no back end logging of jobs that it fires off?
Support
2012-11-15T20:01:36Z
We do log what is being done by VC but this time it is internally of a file. I wish we could have same setup and reproduce it here.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top