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

Scheduler does not run until WEB API server receives its first HTTP Request #388

Open
amande4x opened this issue May 29, 2024 · 6 comments
Assignees

Comments

@amande4x
Copy link

I have scheduled my scheduler to run every 1 minute. But after I deploy by server and recycle my app-pool, scheduler does not run. It only starts running when it receives first HHTP request from UI front end.
How can i overcome this dependency?

@jamesmh
Copy link
Owner

jamesmh commented Jun 20, 2024

Are you using IIS? Which version? Which version of .NET?

@jamesmh jamesmh self-assigned this Jun 20, 2024
@amande4x
Copy link
Author

IIS - Version 10, .NET 8.
I would appreciate it, if you can you please prioritize this issue? It's causing significant problems for my client.

@srivastava-prashant
Copy link

We too are facing issue, I see - until you launch the application and it makes first API call Coravel's Scheduler does not even initiate. The problem we face here is - If you have frequent release for product. And, you mostly prefer to deploy during Off business hours.

Then, in that case unless we explicit browse the application that would not trigger. And, If no one launch the application for a while post release then it would potentially impact the system. Because, there could be data which your system was expecting but it won't come through as the Coravel's Scheduler has even initated.

@srivastava-prashant
Copy link

Check out these closed issues that should help:

Check out these articles linked by the issues:

Per this link (https://www.taithienbo.com/how-to-auto-start-and-keep-an-asp-net-core-web-application-and-keep-it-running-on-iis/) it seems that we would need to set the .NET CLR to .net 4.
But, our API is in .NET 8. And for .NET core based project Microsoft guidelines are to use "No Managed Code" in .NET CLR ( https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/advanced?view=aspnetcore-8.0 )

Can we safely ignore this NET CLR option and continue to be "No Managed Code" ?

image image

@jamesmh
Copy link
Owner

jamesmh commented Jun 25, 2024

Not sure, it's been a few years since I've touched IIS. My best advice is to try the non CLR approach and see if you get the relevant options in IIS? Try testing in a dev environment to see if things work out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants