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

Update calling-methods-with-delay.rst #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions background-methods/calling-methods-with-delay.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Sometimes you may want to postpone a method invocation, for example, to send an
() => Console.WriteLine("Hello, world"),
TimeSpan.FromDays(1));

:doc:`Hangfire Server <../background-processing/processing-background-jobs>` periodically check the schedule to enqueue scheduled jobs to their queues, allowing workers to perform them. By default, check interval is equal to ``15 seconds``, but you can change it, just pass the corresponding option to the ``BackgroundJobServer`` ctor.
Delayed jobs are placed in a separate set than message jobs. The :doc:`Hangfire Server <../background-processing/processing-background-jobs>` periodically checks this set to see if their are any jobs to be placed onto a message queue. If their are, the Server removes the job from the set and sends it to the appropriate queue. The default interval for this periodic check is ``15 seconds``, but you can change it. To do this pass the corresponding option to the ``BackgroundJobServer`` ctor.

.. code-block:: c#

Expand All @@ -20,7 +20,7 @@ Sometimes you may want to postpone a method invocation, for example, to send an

var server = new BackgroundJobServer(options);

If you are processing your jobs inside an ASP.NET application, you should be warned about some setting that may prevent your scheduled jobs to be performed in-time. To avoid that behavour, perform the following steps:
If you are processing your jobs inside an ASP.NET application, you should be warned that some settings (i.e. increasing the queue polling) may prevent your scheduled jobs from being performed in-time (before the ASP.Net thread spins down). To avoid this behavour, perform the following steps:

* `Disable Idle Timeout <http://bradkingsley.com/iis7-application-pool-idle-time-out-settings/>`_ – set its value to ``0``.
* Use the `application auto-start <http://weblogs.asp.net/scottgu/auto-start-asp-net-applications-vs-2010-and-net-4-0-series>`_ feature.
* Use the `application auto-start <http://weblogs.asp.net/scottgu/auto-start-asp-net-applications-vs-2010-and-net-4-0-series>`_ feature.