Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Getting an Application Error when trying to set up this application to run in windows task scheduler. I am wanting to run your application weekly on the server #10

Closed
tysonsearls opened this issue Aug 9, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@tysonsearls
Copy link

Bug Report

1.0.6.0

Current behavior:

Getting an Windows Application Error when trying to set up this application to run in windows task scheduler. It never fully runs in task scheduler and I get a Windows Application Error in the logs:

Faulting application name: AzureDevOpsBackup.exe, version: 1.0.6.0, time stamp: 0xf9244bba
Faulting module name: clr.dll, version: 4.8.4729.0, time stamp: 0x6614c017
Exception code: 0xc00000fd
Fault offset: 0x000000000005ee02
Faulting process id: 0x1dc0
Faulting application start time: 0x01daea744d4837ab
Faulting application path: C:\Program Files\Azure DevOps Backup\1.0.6.0\AzureDevOpsBackup\AzureDevOpsBackup.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Report Id: 3d999ce7-0033-45e5-bbc6-c63665a214ca
Faulting package full name:
Faulting package-relative application ID:

With some google searching it looks like a clr.dll with a exception code 0xc00000fd is a stack overflow
https://stackoverflow.com/questions/11465674/how-to-solve-stopped-windows-service-clr-dll-error

Expected behavior:

This is a console application. This should normally be able to run without issue using Task Scheduler.
All I am doing in Task Scheduler is under action tab running the exe under "program/script" with the "Add arguments" with the regular arguments that work in a command prompt

Steps to reproduce:

set up your application to run in task scheduler, it will finish with in seconds and send an application error to windows application logs.

Related code:

insert short code snippets here

Other information:

Sorry to find issues with your app. It would really help us out with disaster preparedness if I could run it in a scheduled task once a week. You app would be perfect for our needs. Thanks for your help - Tyson

@tysonsearls tysonsearls added the bug Something isn't working label Aug 9, 2024
@michaelmsonne
Copy link
Owner

michaelmsonne commented Aug 9, 2024

Hi @tysonsearls ,

Hmm strange - worked here for a long time on my Windows Server 2022...

image

My taks here is setup like this:

Program/Script: "D:\Microsoft\Azure DevOps\AzureDevOpsBackup.exe"

Arguments: .\AzureDevOpsBackup.exe --token "token.bin" --org "Sonnes" --backup "D:\Backup\Azure DevOps" --server "xxxxxxcloud.mail.protection.outlook.com" --port "25" --from "[email protected]" --to "[email protected]" --unzip --cleanup --daystokeepbackup 180

Start in: D:\Microsoft\Azure DevOps

How is your setup, also with the permisions to the folder it runs on - as the AzureDevOpsBackup.exe creates the logs in the folder .\Logs behind it (as it is now)

@michaelmsonne
Copy link
Owner

The updated readme file is updated with this too :)

@tysonsearls
Copy link
Author

It was permissions to write to the logs file. It is working now. Thanks!

@michaelmsonne
Copy link
Owner

Good to hear it´s fixed @tysonsearls ;)

I will update the README a bit with some information like around this - the error handling (and in the logs) should note it around the "UnauthorizedAccessException" in the code in general when saveing backups.

But I see here https://github.com/michaelmsonne/AzureDevOpsBackupTool/blob/master/AzureDevOpsBackup/Class/FileLogger.cs#L75 that its missing here - will add it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants