-
Notifications
You must be signed in to change notification settings - Fork 104
/
index.html
347 lines (339 loc) · 18.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
---
layout: default
title: Hangfire – Background jobs and workers for .NET and .NET Core
jumbotron: true
keywords: asp.net background jobs, asp.net background workers
description: An easy way to perform background processing in .NET and .NET Core applications. No Windows Service or separate process required.
---
<div class="jumbotron">
<div class="container">
<div class="row" itemscope itemtype="http://schema.org/SoftwareApplication">
<div class="col-md-7" style="padding-top: 15px;">
<img src="{{ site.cdn }}/logo.svg" alt="Hangfire Logo" height="64" style="margin-left: -5px; margin-bottom:5px;">
<p style="margin-bottom: 10px;">
An easy way to perform background processing in .NET and .NET Core applications.
No Windows Service or separate process required.
</p>
<p>
Backed by persistent storage. Open and free for commercial use.
</p>
<p>
<a href="https://www.nuget.org/packages/Hangfire/" target="_blank">
<img src="https://www.hangfire.io/shields/nuget/v/Hangfire.Core.svg?label=release" alt="Latest release"></a>
<a href="https://www.nuget.org/packages/Hangfire.Core/" target="_blank">
<img src="https://www.hangfire.io/shields/nuget/dt/Hangfire.Core.svg?style=flat" alt="Package downloads"></a>
<a href="https://github.com/HangfireIO/Hangfire/stargazers" target="_blank"><img src="https://www.hangfire.io/shields/github/stars/HangfireIO/Hangfire.svg?style=social" alt="Stars on GitHub"></a>
</p>
</div>
<div class="col-md-5">
<div id="screenshots" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#screenshots" data-slide-to="0" class="active"></li>
<li data-target="#screenshots" data-slide-to="1"></li>
<li data-target="#screenshots" data-slide-to="2"></li>
<li data-target="#screenshots" data-slide-to="3"></li>
<li data-target="#screenshots" data-slide-to="4"></li>
<li data-target="#screenshots" data-slide-to="5"></li>
<li data-target="#screenshots" data-slide-to="6"></li>
<li data-target="#screenshots" data-slide-to="7"></li>
<li data-target="#screenshots" data-slide-to="8"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox" aria-label="Dashboard UI Screenshots">
<div class="item active">
<a href="{{ site.cdn }}/img/ui/dashboard.png" role="option" data-lightbox="Screenshots" data-title="Dashboard">
<img src="{{ site.cdn }}/img/ui/dashboard-sm.png" width="450" height="267" alt="Dashboard">
</a>
</div>
<div class="item">
<a href="{{ site.cdn }}/img/ui/queues.png" role="option" data-lightbox="Screenshots" data-title="Queue List">
<img src="{{ site.cdn }}/img/ui/queues-sm.png" width="450" height="267" alt="Queue List">
</a>
</div>
<div class="item">
<a href="{{ site.cdn }}/img/ui/job-details.png" role="option" data-lightbox="Screenshots" data-title="Job Details">
<img src="{{ site.cdn }}/img/ui/job-details-sm.png" width="450" height="267" alt="Job Details">
</a>
</div>
<div class="item">
<a href="{{ site.cdn }}/img/ui/retries.png" role="option" data-lightbox="Screenshots" data-title="Retry List">
<img src="{{ site.cdn }}/img/ui/retries-sm.png" width="450" height="267" alt="Retry List">
</a>
</div>
<div class="item">
<a href="{{ site.cdn }}/img/ui/failed-jobs.png" role="option" data-lightbox="Screenshots" data-title="Failed Job List">
<img src="{{ site.cdn }}/img/ui/failed-jobs-sm.png" width="450" height="267" alt="Failed Job List">
</a>
</div>
<div class="item">
<a href="{{ site.cdn }}/img/ui/recurring-jobs.png" role="option" data-lightbox="Screenshots" data-title="Recurring Jobs">
<img src="{{ site.cdn }}/img/ui/recurring-jobs-sm.png" width="450" height="267" alt="Recurring Jobs">
</a>
</div>
<div class="item">
<a href="{{ site.cdn }}/img/ui/batches.png" role="option" data-lightbox="Screenshots" title="Batch List">
<img src="{{ site.cdn }}/img/ui/batches-sm.png" width="450" height="267" alt="Batch List">
</a>
</div>
<div class="item">
<a href="{{ site.cdn }}/img/ui/batch-details.png" role="option" data-lightbox="Screenshots" title="Batch Details">
<img src="{{ site.cdn }}/img/ui/batch-details-sm.png" width="450" height="267" alt="Batch Details">
</a>
</div>
<div class="item">
<a href="{{ site.cdn }}/img/ui/batch-jobs.png" role="option" data-lightbox="Screenshots" title="Batch Jobs">
<img src="{{ site.cdn }}/img/ui/batch-jobs-sm.png" width="450" height="267" alt="Batch Jobs">
</a>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#screenshots" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#screenshots" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-9">
<div class="row">
<div class="col-md-6">
<h3>Fire-and-Forget Jobs</h3>
<p>
Fire-and-forget jobs are executed <strong>only once</strong> and almost <strong>immediately</strong> after creation.
</p>
<pre><span class="keywd">var</span> jobId = <span class="type">BackgroundJob</span>.Enqueue(
() => <span class="type">Console</span>.WriteLine(<span class="string">"Fire-and-forget!"</span>));</pre>
</div>
<div class="col-md-6">
<h3>Delayed Jobs</h3>
<p>
Delayed jobs are executed <strong>only once</strong> too, but not immediately, after a certain <strong>time interval</strong>.
</p>
<pre><span class="keywd">var</span> jobId = <span class="type">BackgroundJob</span>.Schedule(
() => <span class="type">Console</span>.WriteLine(<span class="string">"Delayed!"</span>),
<span class="type">TimeSpan</span>.FromDays(7));</pre>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Recurring Jobs</h3>
<p>
Recurring jobs fire <strong>many times</strong> on the specified <strong>CRON schedule</strong>.
</p>
<pre><span class="type">RecurringJob</span>.AddOrUpdate(
<span class="string">"myrecurringjob"</span>,
() => <span class="type">Console</span>.WriteLine(<span class="string">"Recurring!"</span>),
<span class="type">Cron</span>.Daily);</pre>
</div>
<div class="col-md-6">
<h3>Continuations</h3>
<p>
Continuations are executed when its parent job <strong>has been finished</strong>.
</p>
<pre><span class="type">BackgroundJob</span>.ContinueJobWith(
jobId,
() => <span class="type">Console</span>.WriteLine(<span class="string">"Continuation!"</span>));</pre>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Batches <a href="/pro/" class="label label-primary">Pro</a></h3>
<p>Batch is a group of background jobs that is <strong>created atomically</strong> and considered as a single entity.</p>
<pre><code><span class="keywd">var</span> batchId = <span class="type">BatchJob</span>.StartNew(x =>
{
x.Enqueue(() => <span class="type">Console</span>.WriteLine(<span class="string">"Job 1"</span>));
x.Enqueue(() => <span class="type">Console</span>.WriteLine(<span class="string">"Job 2"</span>));
});</code></pre>
</div>
<div class="col-md-6">
<h3>Batch Continuations <a href="/pro/" class="label label-primary">Pro</a></h3>
<p>
Batch continuation is fired <strong>when all</strong> background jobs in a parent batch <strong>finished</strong>.
</p>
<pre><code><span class="type">BatchJob</span>.ContinueBatchWith(batchId, x =>
{
x.Enqueue(() => <span class="type">Console</span>.WriteLine(<span class="string">"Last Job"</span>));
});</code></pre>
</div>
</div>
</div>
<div class="col-md-3">
{% include news.html %}
<h3 style="margin-top: 5px;">Courses</h3>
<div class="div-thumbnail">
<div id="carousel-courses" class="carousel slide" data-ride="carousel">
<div class="carousel-inner" role="listbox" aria-label="Courses">
<div class="item active">
<a href="https://www.udemy.com/course/building-background-services-in-net-with-hangfire/?referralCode=ADE705B8BB4A44749A7D" target="_blank" role="option">
<img src="{{ site.cdn }}/img/udemy.png" width="252" height="142" alt="Udemy Course">
</a>
</div>
<div class="item">
<a href="https://www.pluralsight.com/courses/simplified-dotnet-background-tasks-hangfire" target="_blank" role="option">
<img src="{{ site.cdn }}/img/pluralsight.png" width="252" height="142" alt="Pluralsight Course">
</a>
</div>
</div>
<a class="left carousel-control" href="#carousel-courses" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-courses" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-4 feature">
<div class="feature-icon">
<span class="glyphicon glyphicon-send"></span>
</div>
<div class="feature-body">
<h3>Simple</h3>
<p>
<a href="https://docs.hangfire.io/en/latest/quick-start.html" target="_blank">Easy to set up, easy to use</a>. No Windows Service, no Windows Scheduler, no separate applications required.
</p>
<p>
Background jobs are regular static or instance .NET methods with regular arguments – no base class or interface implementation required.
</p>
</div>
</div>
<div class="col-md-4 feature">
<div class="feature-icon">
<span class="glyphicon glyphicon-floppy-saved"></span>
</div>
<div class="feature-body">
<h3>Persistent</h3>
<p>
Background jobs are created in a persistent storage – <a href="https://docs.hangfire.io/en/latest/configuration/using-sql-server.html">SQL Server</a> and <a href="https://docs.hangfire.io/en/latest/configuration/using-redis.html">Redis</a> supported officially, and a lot of other <a href="/extensions.html#storages">community-driven</a> storages.
</p>
<p>
You can safely restart your application and use Hangfire with ASP.NET without worrying about application pool recycles.
</p>
</div>
</div>
<div class="col-md-4 feature">
<div class="feature-icon">
<span class="glyphicon glyphicon-search"></span>
</div>
<div class="feature-body">
<h3>Transparent</h3>
<p>
Built-in web interface allow you to see the whole picture of your background processing, as well as observe the state of each background job.
</p>
<p>
Out of the box support for popular <a href="https://docs.hangfire.io/en/latest/configuration/configuring-logging.html">logging frameworks</a> allows you to catch errors early with zero configuration.
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 feature">
<div class="feature-icon">
<span class="glyphicon glyphicon-tower"></span>
</div>
<div class="feature-body">
<h3>Reliable</h3>
<p>
Once a background job was created without any exception, Hangfire takes the responsibility to process it with the <em>at least once</em> semantics.
</p>
<p>
You are free to throw unhandled exceptions or terminate your application – background jobs will be re-tried automatically.
</p>
</div>
</div>
<div class="col-md-4 feature">
<div class="feature-icon">
<span class="glyphicon glyphicon-fullscreen"></span>
</div>
<div class="feature-body">
<h3>Distributed</h3>
<p>
Background method calls and their arguments are serialized and may overcome the process boundaries.
</p>
<p>
You can use Hangfire on different machines to get more processing power with no configuration – synchronization is performed automatically.
</p>
</div>
</div>
<div class="col-md-4 feature">
<div class="feature-icon">
<span class="glyphicon glyphicon-th-large"></span>
</div>
<div class="feature-body">
<h3>Extensible</h3>
<p>
Job filters allow you to add custom features to the background processing in a way similar to ASP.NET MVC action filters.
</p>
<p>
Job storage access is fully abstracted and you can implement the support for your favorite storage. Dashboard supports modifications too.
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 feature">
<div class="feature-icon">
<span class="glyphicon glyphicon-flash"></span>
</div>
<div class="feature-body">
<h3>Efficient</h3>
<p>
Although the default installation uses SQL Server and polling technique to fetch jobs, you can leverage <a href="https://www.nuget.org/packages/Hangfire.SqlServer.MSMQ/">MSMQ</a> or <a href="https://www.nuget.org/packages/Hangfire.Redis/" target="_blank">Redis</a> extensions to reduce the processing latency to minimum.
</p>
</div>
</div>
<div class="col-md-4 feature">
<div class="feature-icon">
<span class="glyphicon glyphicon-cog"></span>
</div>
<div class="feature-body">
<h3>Self-maintainable</h3>
<p>
You don't need to perform manual storage clean-up – Hangfire keeps it as clean as possible and removes old records automatically.
</p>
</div>
</div>
<div class="col-md-4 feature">
<div class="feature-icon">
<i class="fa fa-github" style="font-size: 23px;"></i>
</div>
<div class="feature-body">
<h3>Open Source</h3>
<p>
Hangfire is open source software and is completely free for commercial use. It is licensed under <a href="https://github.com/HangfireIO/Hangfire/blob/main/LICENSE.md">LGPLv3 license</a>.
</p>
<p>
Fork <a href="https://github.com/HangfireIO/Hangfire" target="_blank">the project</a> and make contributions on GitHub!
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" style="text-align: center;">
<hr>
<div>
<a class="btn btn-primary btn-lg" href="/overview.html">Overview</a>
<br class="visible-xs">
<span class="btn btn-lg">or</span>
<br class="visible-xs">
<a class="btn btn-default btn-lg" href="https://docs.hangfire.io">Documentation</a>
</div>
</div>
</div>
</div>