分布式计划任务运行框架 LiteCron

码农软件 · 软件分类 · 作业/任务调度 · 2019-09-04 08:57:11

软件介绍

LiteCron 是一个基于 Go 的分布式计划任务运行框架,可以很容易的集成到 web app 中。它基于 Redis 实现分布式锁,无需特别的存储依赖。

案例

  • 在 web app 中运行计划任务。

  • 构建分布式计划任务服务以替换系统计划任务服务。

用法

//Step 1: init default cron client.
	litecron.InitDefaultCron(&litecron.MutexConfig{
		RedisConfig:&litecron.RedisConfig{
			DNS:"127.0.0.1:6379",
		},
		Prefix:"litecron/examples/defaults/",
		Factor:0.01,
	})
	//Register a cron job for every 2 seconds.
	litecron.Register("@every 2s",exampleHandle)
	go litecron.Run()
	time.Sleep(10 * time.Second)
	// Output:

Demo

  1. default cron client

  2. without default cron client

  3. mock multi processor

本文地址:https://codercto.com/soft/d/13840.html

Designing with Web Standards (2nd Edition)

Designing with Web Standards (2nd Edition)

Jeffrey Zeldman / Peachpit Press / 2006-07-06 / USD 44.99

Best-selling author, designer, and web standards evangelist Jeffrey Zeldman has updated his classic, industry-shaking guidebook. This new edition--now in full color--covers improvements in best prac......一起来看看 《Designing with Web Standards (2nd Edition)》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

SHA 加密
SHA 加密

SHA 加密工具