Quartz scheduling actor
Перейти к файлу
Gregorius Soedharmo 653c1da72f
Update common.props, modernize all nuget package versions (#207)
* Update common.props, modernize all nuget package versions

* Update build system
2021-12-22 00:16:45 +07:00
.github Upgrade to GitHub-native Dependabot (#158) 2021-05-12 09:02:08 -05:00
build-system Update common.props, modernize all nuget package versions (#207) 2021-12-22 00:16:45 +07:00
src Update common.props, modernize all nuget package versions (#207) 2021-12-22 00:16:45 +07:00
.gitignore Update build-system 2019-10-11 14:49:10 +02:00
Akka.Quartz.Actor.sln Update build-system 2019-10-11 14:49:10 +02:00
LICENSE Initial commit 2016-03-05 09:10:54 +04:00
README.md Fixed line break in for more info 2019-10-12 17:55:31 +02:00
RELEASE_NOTES.md Update RELEASE_NOTES.md for 1.4.25 release 2021-09-10 00:01:56 +07:00
build.cmd Update build-system 2019-10-11 14:49:10 +02:00
build.fsx Update build-system 2019-10-11 14:49:10 +02:00
build.ps1 Update common.props, modernize all nuget package versions (#207) 2021-12-22 00:16:45 +07:00

README.md

This is the Quartz integration plugin for Akka.NET.

Using

Install:

PM>Install-Package Akka.Quartz.Actor

Create a Receiver:

class Receiver: ActorBase
{
    public Receiver()
    {
    }

    protected override bool Receive(object message)
    {
    	//handle scheduled message here
    }
 }
var receiver = Sys.ActorOf(Props.Create(() => new Receiver()), "Receiver");

Create a QuartzActor:

var quartzActor = Sys.ActorOf(Props.Create(() => new QuartzActor()), "QuartzActor");

Send "Hello" message to Receiver Actor:

quartzActor.Tell(new CreateJob(receiver, "Hello", TriggerBuilder.Create().WithCronSchedule( " * * * * * ?").Build())));

Now message "Hello" will be delivered to receiver every 5 seconds.

PersistentActor

The persistent quartz scheduling actor. This allows the jobs to be persisted in the Quartz jobstore and then to work in a new instance of application with new incarnations of the actors.

var quartzPersistentActor = Sys.ActorOf(Props.Create(() => new QuartzPersistentActor()), "QuartzActor");
quartzPersistentActor.Tell(new CreatePersistentJob(receiver, "Hello", TriggerBuilder.Create().WithCronSchedule("*0/10 * * * * ?").Build()));

For more information, please see the unit test.

For more information about quartz scheduler please see http://www.quartz-scheduler.net/documentation/

For more information about akka.net please see https://getakka.net/articles/intro/what-is-akka.html