All Projects → GokGokalp → Jobber

GokGokalp / Jobber

Licence: MIT license
Jobber is lightweight, simple and distributed task scheduler.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to Jobber

Redisson
Redisson - Redis Java client with features of In-Memory Data Grid. Over 50 Redis based Java objects and services: Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Publish / Subscribe, Bloom filter, Spring Cache, Tomcat, Scheduler, JCache API, Hibernate, MyBatis, RPC, local cache ...
Stars: ✭ 17,972 (+71788%)
Mutual labels:  scheduler, distributed
Quartznet
Quartz Enterprise Scheduler .NET
Stars: ✭ 4,825 (+19200%)
Mutual labels:  scheduler, scheduled-tasks
King.Service
Task scheduling for .NET
Stars: ✭ 34 (+36%)
Mutual labels:  scheduler, scheduled-tasks
Haipproxy
💖 High available distributed ip proxy pool, powerd by Scrapy and Redis
Stars: ✭ 4,993 (+19872%)
Mutual labels:  scheduler, distributed
Frame Scheduling
Asynchronous non-blocking running many tasks in JavaScript. Demo https://codesandbox.io/s/admiring-ride-jdoq0
Stars: ✭ 64 (+156%)
Mutual labels:  scheduler, scheduled-tasks
Powerjob
Enterprise job scheduling middleware with distributed computing ability.
Stars: ✭ 3,231 (+12824%)
Mutual labels:  scheduler, distributed
Xxl Job
A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)
Stars: ✭ 20,197 (+80688%)
Mutual labels:  scheduler, distributed
Schedulemastercore
This is a distributed task management system base on .Net Core platform .
Stars: ✭ 549 (+2096%)
Mutual labels:  scheduler, distributed
Rq Scheduler
A lightweight library that adds job scheduling capabilities to RQ (Redis Queue)
Stars: ✭ 1,095 (+4280%)
Mutual labels:  scheduler, scheduled-tasks
Jobs
jobs 分布式任务调度平台
Stars: ✭ 245 (+880%)
Mutual labels:  scheduler, scheduled-tasks
Shardingsphere Elasticjob Cloud
Stars: ✭ 248 (+892%)
Mutual labels:  scheduler, distributed
openMIC
Meter Information Collection System
Stars: ✭ 15 (-40%)
Mutual labels:  scheduled-tasks
ptScheduler
Pretty tiny Scheduler or ptScheduler is an Arduino library for writing non-blocking periodic tasks easily.
Stars: ✭ 14 (-44%)
Mutual labels:  scheduler
erl dist
Rust Implementation of Erlang Distribution Protocol
Stars: ✭ 110 (+340%)
Mutual labels:  distributed
dask-sql
Distributed SQL Engine in Python using Dask
Stars: ✭ 271 (+984%)
Mutual labels:  distributed
time.clj
time util for Clojure(Script)
Stars: ✭ 45 (+80%)
Mutual labels:  scheduler
humpback-center
Humpback Center 主要为 Humpback 平台提供集群容器调度服务,以集群中心角色实现各个 Group 的容器分配管理。
Stars: ✭ 37 (+48%)
Mutual labels:  scheduler
hazelcast-csharp-client
Hazelcast .NET Client
Stars: ✭ 98 (+292%)
Mutual labels:  distributed
xamarin-forms-demo-app
A demo application in this repository demonstrates the capabilities of the DevExpress Mobile UI for Xamarin.Forms: Data Grid, Editors, Charts, Scheduler, Data Form, and other controls.
Stars: ✭ 74 (+196%)
Mutual labels:  scheduler
heat
Distributed tensors and Machine Learning framework with GPU and MPI acceleration in Python
Stars: ✭ 127 (+408%)
Mutual labels:  distributed

Jobber


alt tag

Jobber is lightweight, simple and distributed task scheduler.

NuGet version

NuGet Packages

PM> Install-Package Jobber

###Features:

  • Easy to use
  • Pub/Sub mode distributed task scheduling
  • Standalone mode task scheduling
  • Includes high availability modes for producers (ActiveActive-ActivePassive)
  • Includes service recovery modes
  • Logging (currently only support NLog)

###To-Do:

  • Dashboard for service instances
  • Abstraction for logging

Usage:

For standalone job worker mode:

class TodoStandaloneJobWorker : StandaloneJobWorkerBase
{
    protected override void ExecuteJob()
    {
        Console.WriteLine("Hello World!");
    }
}

just inherit the StandaloneJobWorkerBase for your job worker class, and then initialize as follows:

class Program
{
    static void Main(string[] args)
    {
        string jobName = "Todo";
        int restartDelayInMinutes = 1;
        TimeSpan schedulingTickTime = TimeSpan.FromSeconds(5);
        TimeSpan lockDuration = TimeSpan.FromSeconds(10);
        List<EndPoint> redisEndPoints = new List<EndPoint>()
            {
                new DnsEndPoint("", 6379)
            };

        JobberBuilder.Instance.SetJobName(jobName)
                              .EnableServiceRecovery(restartDelayInMinutes)
                              .CreateStandaloneJobWorker()
                                    .SetStandaloneJobWorker<TodoStandaloneJobWorker>()
                                    .SetSchedulingTickTime(schedulingTickTime)
                                    .HighAvailabilitySetup()
                                            .UseActivePassive()
                                            .InitializeRedisForLocking(redisEndPoints)
                                            .SetLockingDuration(lockDuration)
                                            .Then()
                                    .RunAsLocalService();
    }
}

For pub/sub job worker mode, firstly let's initialize job producer.

class TodoJobProducer : JobProducerBase<Todo>
{
    protected override List<IJob<Todo>> GetJobs()
    {
        List<IJob<Todo>> jobs = new List<IJob<Todo>>
            {
                new TodoJob
                {
                    Data = new Todo() {TodoId = 1, TodoNumber = Guid.NewGuid().ToString()}
                },
                new TodoJob
                {
                    Data = new Todo() {TodoId = 2, TodoNumber = Guid.NewGuid().ToString()}
                }
            };

        return jobs;
    }
}

just inherit the JobProducerBase. TJob is your job entity. After this, override the GetJobs() method and return your job data. Now initialize producer as follows:

class Program
{
    static void Main(string[] args)
    {
        string jobName = "Todo";
        string rabbitMqUri = "";
        string rabbitMqUserName = "";
        string rabbitMqPassword = "";
        string rabbitMqTodoQueueName = "todo.queue";
        int restartDelayInMinutes = 1;
        TimeSpan schedulingTickTime = TimeSpan.FromSeconds(5);
        TimeSpan lockDuration = TimeSpan.FromSeconds(10);
        List<EndPoint> redisEndPoints = new List<EndPoint>()
            {
                new DnsEndPoint("", 6379)
            };

        JobberBuilder.Instance.SetJobName(jobName)
                              .EnableServiceRecovery(restartDelayInMinutes)
                              .CreateJobProducer()
                                    .SetRabbitMqCredentials(rabbitMqUri, rabbitMqUserName, rabbitMqPassword)
                                    .SetQueueName(rabbitMqTodoQueueName)
                                    .SetJobProducer<TodoJobProducer>()
                                    .SetSchedulingTickTime(schedulingTickTime)
                                    .HighAvailabilitySetup()
                                            .UseActivePassive()
                                            .InitializeRedisForLocking(redisEndPoints)
                                            .SetLockingDuration(lockDuration)
                                            .Then()
                                    .RunAsLocalService();

    }
}

For job consumer:

class TodoJobConsumer : JobConsumerBase<Todo>
{
    public override async Task ConsumeJob(ConsumeContext<IJob<Todo>> job)
    {
        await Console.Out.WriteLineAsync(job.Message.Data.TodoNumber);
    }
}

then initialize job consumer as follow:

class Program
{
    static void Main(string[] args)
    {
        string jobName = "Todo";
        string rabbitMqUri = "";
        string rabbitMqUserName = "";
        string rabbitMqPassword = "";
        string rabbitMqTodoQueueName = "todo.queue";
        int incrementalRetryLimit = 3;
        TimeSpan initialIncrementalRetryInterval = TimeSpan.FromMinutes(5);
        TimeSpan intervalIncrementalRetryIncrement = TimeSpan.FromMinutes(10);
        int restartDelayInMinutes = 1;

        JobberBuilder.Instance.SetJobName(jobName)
                              .EnableServiceRecovery(restartDelayInMinutes)
                              .CreateJobConsumer()
                                    .SetRabbitMqCredentials(rabbitMqUri, rabbitMqUserName, rabbitMqPassword)
                                    .UseIncrementalRetryPolicy(incrementalRetryLimit, initialIncrementalRetryInterval, intervalIncrementalRetryIncrement)
                                    .SetQueueName(rabbitMqTodoQueueName)
                                    .SetJobConsumer<TodoJobConsumer>()
                                    .RunAsLocalService();
    }
}

###Samples:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].