Community forum

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


greatland
2011-08-10T16:49:03Z
I am using the VisualCron demo with intent to purchase the software, but I am getting failures for batch jobs that run with Background Execution.

We started using the software yesterday on a Server 2008 R2 server and have about 12 jobs. All jobs were configured to use Background Execution. The jobs are all batch files that kick off executables that perform basic file operations, sql commands, and web service calls.

The jobs were running fine up until this morning when they all started failing. If any jobs were manually run on the same server, they would work fine. We tried adjusting the task execution options, including the credentials, the Logon Type, and API vs Managed Code. None of those settings had any impact on the failures.

I created a new job, it was a batch file that pinged localhost. This job would not start with background execution. The System Log (debug) for VC displays the following:

Task completed: Steve Test (4086)
Setting previous task in TaskProcessCompleted: Steve Test (f80b3af8-d510-4ab6-b926-a5a8c413b777) in job: Steve Test
Process status - About to raise TaskCompleted (4086)
Task completed: Steve Test (4086)
Closing desktop handles (4086)
Process status - About to raise TaskCompleted (4086)
Ending output readers (4086)
Closing desktop handles (4086)
Ending timeout timer (4086)
Ending output readers (4086)
Could not kill process, err: No process is associated with this object.
Ending timeout timer (4086)
Ending output readers (4086)
Process status - ProcessHandles closed (4086)
Ending timeout timer (4086)
Process status - ExitCode fetched (4086)
Process status - process has already exited at WaitForExit
Process status - process has exited at retrieving process id (4086)
Task "Steve Test" exited with code: -1073741502(Error description was not found (-1073741502))
Exception in Task: Non zero exit code
Process status - trying to retrieve exit code
Process status - waiting for exit
Process status - OutPut captured (4086)
Process status - starting up output reader
Impersonation result: True
Task started: Steve Test (4086)
Task (4086) was added to processlist: Steve Test
Skipping Condition check because the Job was run manually.
User "Steve Eversen" - Ran Job: Steve Test
Job (4096) was added to processlist: Steve Test
Job started: Steve Test


Windows System Event Log displays the following message:

Application popup: cmd.exe - Application Error : The application was unable to start correctly (0xc0000142). Click OK to close the application.

Everything works fine if I use Foreground Execution. But my understanding is that BE uses the VCService and FE uses the VCTray. It seems like the VCService is hung up or being prevented from launching new BE tasks. I don't understand why it was working fine for several hours and then suddenly nothing works as a BE. I have not rebooted or restarted the VCService. I have disabled AV and that has not helped. I would prefer to use BE if at all possible. Any thoughts?
Sponsor
Forum information
Support
2011-08-10T17:12:57Z
Could you try to configure without using cmd.exe. I mean, running the actual batch file or exe?

Also, are you using Credentials for this Task or not? (from the beginning in VisualCron when it worked)
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
greatland
2011-08-10T17:36:18Z
I am running an actual batch file. Since it is just doing a simple ping for testing purposes, the process shows as cmd.exe. I have tried to run this with credentials and without.
Support
2011-08-10T18:22:53Z
We will contact you via email for some testing.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
greatland
2011-08-15T13:59:38Z
I did some testing and I think I have this figured out. The problem we experienced appears to be related to two components in Server 2008 not playing well with the VisualCron Service when a process that spawned from a scheduled job would crash. Many of the applications we are running in VisualCron are in active development so we expect to have crashes from time to time. The two components are Interactive Services Detection and Windows Error Reporting.

This is the behavior we were seeing. Every so often a custom application that was scheduled would crash for some reason. It was running with the background execution option selected. The application crash would trigger WerFault.exe which requires interaction with the desktop. It seems that once this would happen something gets hung up within the VisualCron Service and it is no longer able to execute any new jobs with Background Execution.

Our solution:

1. Use a service account for your jobs and log in to the server with that service account. Modify the following registry key to prevent WerFault.exe from spawning.

2. Set this registry value to 1 HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting\DontShowUI

3. (Optional) We also stopped the Interactive Service Detection service and set it to disabled. This service was spamming the event log when many of our jobs were running, I don't think this actually breaks/fixes anything other than the event log spam.

After we made these changes our application crashes do not seem to have any negative impact on the VisualCron service stability. Please keep in mind that while I have tested this, it is still speculation. Support, do you have any thoughts on this issue?

More information

http://blogs.msdn.com/b/patricka/archive/2010/04/27/what-is-interactive-services-detection-and-why-is-it-blinking-at-me.aspx 

http://blogs.msdn.com/b/alejacma/archive/2011/02/18/how-to-disable-the-pop-up-that-windows-shows-when-an-app-crashes.aspx 
Support
2011-08-15T16:11:28Z
That does seem like a good solution. In 2008, with changed desktop interaction behavior, popups etc. really are a problem. And for VisualCron, which prefer to stay in background it causes problems as well.

This setting does not alter anything to the bad. It will still log crashes to the event log and I think you will receive the same crash list of you open the tool for sending crashes to Microsoft.

Thanks for the links and reg info.

A quick note, you don't need to create a service account. You could use VisualCron together with the registry write Task to set that.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2015-04-14T14:33:56Z
We did some research about exit code -1073741502 and we found 2 possible solutions:

1. Go to administrative tools->Local security policy. Set SYSTEM user with Logon as batch Job. Reboot. Try Task again.
2. Disable UAC. Reboot computer. Try Task again.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2016-06-10T12:38:41Z
We have modified this Task for 8.1.2 so there is no need for UAC disabling. So if you encounter this again please test this beta or official when released: http://www.visualcron.co....aspx?g=posts&t=6721 
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top