All Projects → yuzd → Hangfire.httpjob

yuzd / Hangfire.httpjob

Licence: mit
httpjob for Hangfire,restful api for Hangfire,job调度与业务分离

Projects that are alternatives of or similar to Hangfire.httpjob

orkid-node
Reliable and modern Redis Streams based task queue for Node.js 🤖
Stars: ✭ 61 (-83.33%)
Mutual labels:  job, job-scheduler
Antares
分布式任务调度平台(Distributed Job Schedule Platform)
Stars: ✭ 558 (+52.46%)
Mutual labels:  job-scheduler, job
Swiftqueue
Job Scheduler for IOS with Concurrent run, failure/retry, persistence, repeat, delay and more
Stars: ✭ 276 (-24.59%)
Mutual labels:  job-scheduler, job
Go Quartz
Simple, zero-dependency scheduling library for Go
Stars: ✭ 118 (-67.76%)
Mutual labels:  job-scheduler, job
Factotum
A system to programmatically run data pipelines
Stars: ✭ 158 (-56.83%)
Mutual labels:  job-scheduler, job
Workq
Job server in Go
Stars: ✭ 1,546 (+322.4%)
Mutual labels:  job-scheduler, job
Jiacrontab
简单可信赖的任务管理工具
Stars: ✭ 1,052 (+187.43%)
Mutual labels:  job-scheduler, job
nest-queue
Queue manager for NestJS Framework for Redis (via bull package)
Stars: ✭ 69 (-81.15%)
Mutual labels:  job, job-scheduler
comrade-dev
Comrade is a job scheduler&manager service.
Stars: ✭ 69 (-81.15%)
Mutual labels:  job, job-scheduler
puppet-slurm
A Puppet module designed to configure and manage SLURM(see https://slurm.schedmd.com/), an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters
Stars: ✭ 18 (-95.08%)
Mutual labels:  job-scheduler
workflow-controller
Kubernetes workflow controller
Stars: ✭ 23 (-93.72%)
Mutual labels:  job
thinkgo
Public libraries and components for glang development.
Stars: ✭ 14 (-96.17%)
Mutual labels:  job
Online-Job-Portal
Online Job Portal project is web application built using PHP, MySQL as backend and HTML JavaScript & Bootstrap as Frontend technologies. Note that this software is developed as an academic project.
Stars: ✭ 45 (-87.7%)
Mutual labels:  job
Test-Assignments
List of test assignments. ⚡
Stars: ✭ 85 (-76.78%)
Mutual labels:  job
jobrun
A tiny JavaScript job runner for MongoDB
Stars: ✭ 13 (-96.45%)
Mutual labels:  job-scheduler
future.batchtools
🚀 R package future.batchtools: A Future API for Parallel and Distributed Processing using batchtools
Stars: ✭ 77 (-78.96%)
Mutual labels:  job-scheduler
open-c3
CICD系统/发布系统/作业平台/监控系统/故障自愈/K8S集群管理
Stars: ✭ 142 (-61.2%)
Mutual labels:  job
Db Scheduler
Persistent cluster-friendly scheduler for Java
Stars: ✭ 352 (-3.83%)
Mutual labels:  job-scheduler
Job Interview Questions To Ask Companies
List of interview questions... For candidates! Pick your next company wisely
Stars: ✭ 261 (-28.69%)
Mutual labels:  job
jobs
💪 We are hiring great software developers
Stars: ✭ 12 (-96.72%)
Mutual labels:  job

Hangfire.HttpJob for .netcore

Hangfire.HttpJob for Hangfire

  1. add delay background job by [http post] or on dashbord

  2. add recurring job by [http post] or on dashbord

  3. search job by jobname on dashbord

  4. stop or start job on dashbord

  5. cron generator on dashbord

  6. use Hangfire.HttpJob.Agent extention to quick develop job program

    6.1 Make your webjob very convenient to support scheduling execution

    6.2 Visualizing the execution process of webjob by logs and progress on hangfire dashbord

    6.3 Variety of webjob types with different life cycles

    6.3.1 Singleton

    6.3.2 Transient

    6.3.3 Hang up until stop command

wiki

00.QickStart DockerQuickStart

01.how to create backgroud httpjob

02.how to create recurringHttpJob

03.how to use HttpJob.Agent

04.how to use in sqlserver

05.how to config mail service to report job result

https://github.com/yuzd/Hangfire.HttpJob/wiki

Installation

This library is available as a NuGet Package:

Install-Package Hangfire.HttpJob

Install-Package Hangfire.HttpJob.Agent

Install-Package Hangfire.HttpJob.Client

Usage

	//StartUp.cs
 
	public virtual void ConfigureServices(IServiceCollection services)
	{
		services.AddHangfire(Configuration);//Configuration是下面的方法
	}

	private void Configuration(IGlobalConfiguration globalConfiguration)
	{
		globalConfiguration.UseStorage(
				new MySqlStorage(
					"Server=localhost;Port=3306;Database=hangfire;Uid=root;Pwd=123456;charset=utf8;SslMode=none;Allow User Variables=True",
					new MySqlStorageOptions
					{
						TransactionIsolationLevel = IsolationLevel.ReadCommitted,
						QueuePollInterval = TimeSpan.FromSeconds(15),
						JobExpirationCheckInterval = TimeSpan.FromHours(1),
						CountersAggregateInterval = TimeSpan.FromMinutes(5),
						PrepareSchemaIfNecessary = false,
						DashboardJobListLimit = 50000,
						TransactionTimeout = TimeSpan.FromMinutes(1),
					}))
			.UseConsole()
			.UseHangfireHttpJob();
	}

	public void Configure(IApplicationBuilder app)
	{
		app.UseHangfireServer();
		app.UseHangfireDashboard("/hangfire",new DashboardOptions
		{
			Authorization = new[] { new BasicAuthAuthorizationFilter(new BasicAuthAuthorizationFilterOptions
			{
				RequireSsl = false,
				SslRedirect = false,
				LoginCaseSensitive = true,
				Users = new []
				{
					new BasicAuthAuthorizationUser
					{
						Login = "admin",
						PasswordClear =  "test"
					} 
				}

			}) }
		});
	}

add Hangfire HttpJob by client

    Install-Package Hangfire.HttpJob.Client

    var serverUrl = "http://localhost:5000/job";
    var result = HangfireJobClient.AddBackgroundJob(serverUrl, new BackgroundJob
    {
	JobName = "测试api",
	Method = "Get",
	Url = "http://localhost:5000/testaaa",
	Mail = new List<string> {"[email protected]"},
	SendSucMail = true,
	DelayFromMinutes = 1
    }, new HangfireServerPostOption
    {
	BasicUserName = "admin",
	BasicPassword = "test"
    });
    
    var result = HangfireJobClient.AddRecurringJob(serverUrl, new RecurringJob()
    {
	JobName = "测试5点40执行",
	Method = "Post",
	Data = new {name = "aaa",age = 10},
	Url = "http://localhost:5000/testpost",
	Mail = new List<string> { "[email protected]" },
	SendSucMail = true,
	Cron = "40 17 * * *"
    }, new HangfireServerPostOption
    {
	BasicUserName = "admin",
	BasicPassword = "test"
    });

How to add Hangfire.HttpJob by restful api

1.add backgroundjob

url:http://{hangfireserver}/hangfire/httpjob?op=backgroundjob
method:post
data:
{
  "Method": "POST",
  "ContentType": "application/json",
  "Url": "http://XXXXXXX",
  "DelayFromMinutes": 1,
  "Data": "{\"userName\":\"test\"}",
  "Timeout": 5000,
  "BasicUserName": "",// 如果你希望hangfire执行http的时候带basic认证的话 就设置这2个参数
  "BasicPassword": "",
  "JobName": "test_backgroundjob"
}

2.add recurringjob

url:http://{hangfireserver}/hangfire/httpjob?op=recurringjob
method:post
data:
{
  "Method": "POST",
  "ContentType": "application/json",
  "Url": "http://XXXXXXX",
  "Data": "{\"userName\":\"test\"}",
  "Timeout": 5000,
  "Corn": "0 12 * */2",
  "BasicUserName": "",// 如果你希望hangfire执行http的时候带basic认证的话 就设置这2个参数
  "BasicPassword": "",
  "JobName": "test_recurringjob"
}

How to add Hangfire.HttpJob in Dashbord

image image image image image image image

Email notify

image

Thanks for the Rider IDE provided by JetBrains

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].