Answer the question
In order to leave comments, you need to log in
How to make a site work on iis without requests to the site?
Is there a way to make the site work even if there are no requests to it? The fact is that the site has code that performs scheduled work using quartz. But if there are no requests to the site, then the code is not executed.
Answer the question
In order to leave comments, you need to log in
Usually, scheduled tasks are hung up on CRON (or an analogue), that is, this is a task independent of the web server.
If the site is on its own server or VDS - there is nothing easier to hang up the task to be performed periodically.
If on a hosting - contact them, any hoster probably has a similar service (or, in any case, you can agree) ...
Well, if Monsieur is a pervert, then you can organize the execution of a web request on any other machine with a given frequency, but this , I repeat, a perversion.
A web server serves one purpose - SUDDENLY - to serve web requests. Everything else he should not do (and is not intended for this).
UPDATE: Didn't read it - quartz should normally be hosted on a machine as a windows service.
1. Find the IIS settings file: %WINDIR%\System32\inetsrv\config\applicationHost.config
2. Find the applicationPools section in this file, find the required appPool there, add/replace attributes with autoStart="true" startMode="AlwaysRunning", should be like this:
<applicationPools>
<add name="DefaultAppPool" autoStart="true" startMode="AlwaysRunning" managedRuntimeVersion="v4.0">
<sites>
<site name="Default Web Site" id="1" serverAutoStart="true">
<application path="/" serviceAutoStartEnabled="true" serviceAutoStartProvider="ApplicationPreload"
<serviceAutoStartProviders>
<add name="ApplicationPreload" type="MyNamespace.ApplicationPreload, MyAssembly" />
</serviceAutoStartProviders>
public class ApplicationPreload : System.Web.Hosting.IProcessHostPreloadClient
{
public void Preload(string[] parameters)
{
// Qurtz.Net.Start() // или как там хз
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question