@@ -8,34 +8,45 @@ A job schedule is created by adding a class to your plugin assembly that impleme
88
99``` c#
1010using System ;
11- using Quartz ;
1211
1312namespace MyCommandPlugin
1413{
1514 public class Jobs : IJobs
1615 {
17- public void Schedule (IScheduler scheduler )
16+ public void Schedule (Schedule schedule )
1817 {
1918 // Schedule some jobs
2019 }
2120 }
2221}
2322```
2423
25- This class is automatically discovered by the InEngine.NET scheduler .
24+ The InEngine.NET scheduler automatically discovers this class .
2625It will call the Jobs.Schedule method with an initialized ** InEngine.Scheduling.Schedule** object.
2726
2827``` c#
2928using System ;
30- using Quartz ;
3129
3230namespace MyCommandPlugin
3331{
3432 public class Jobs : IJobs
3533 {
3634 public void Schedule (Schedule schedule )
3735 {
36+ /*
37+ * Run MyCommand every five minutes.
38+ */
3839 schedule .Job (new MyCommand ()).EveryFiveMinutes ();
40+
41+ /*
42+ * Run a lambda expression every ten minutes.
43+ */
44+ schedule .Job (() => Console .WriteLine (" Hello, world!" )).EveryTenMinutes ();
45+
46+ /*
47+ * Run a parameterless method every five minutes.
48+ */
49+ schedule .Job (() => Foo .Bar ).EverySecond ();
3950 }
4051 }
4152}
@@ -219,10 +230,22 @@ sudo supervisorctl reread
219230sudo supervisorctl update
220231```
221232
222- Now, simply start the InEngine Scheduler.
233+ Now, simply start the scheduler workers with the ** supervisorctl ** program:
223234
224235``` bash
225236sudo supervisorctl start inengine-scheduler:*
226237```
227238
239+ ### In a Container with Docker
240+
241+ Install [ Docker] ( https://www.docker.com/what-docker ) first, then pull the ** ethanhann/inengine** image:
242+
243+ ``` bash
244+ docker pull ethanhann/inengine:latest
245+ ```
246+
247+ Now run the scheduler:
228248
249+ ``` bash
250+ docker run --rm inengine -s
251+ ```
0 commit comments