1 Star 0 Fork 27

番茄沙司 / httpquartz

forked from lucky7 / httpquartz 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

HttpQuartz

项目说明

基于Quartz.Net、Polly的Http远程调度系统,netcore3.1+mysql数据库。 在服务端有HttpJob提供http远程调度,客户端通过对trigger的操作来实现调度任务的管理, 通过trigger的JobData传输http请求的相关数据。

功能介绍

  • 添加任务
  • 编辑任务
  • 删除任务
  • 暂停任务
  • 恢复任务
  • 日志查看
  • API客户端
  • IU管理

服务端部署

  1. 新建mysql数据库httpquartz
  2. 执行表结构和数据文件/src/HttpQuartz.Server/database/httpquartz.sql
  3. 修改appsettings.json和quartz.config中数据库连接信息
  4. 配置appsettings.json中SafeClients节点,使信任客户端可以使用HttpAPI
  5. 部署HttpQuartz.Server项目(asp.netcore 3.1项目)
  6. 用户名是:admin,密码是:123456

API客户端

安装:

Install-Package HttpQuartz.Client

使用:

    //实例化HttpClient,或者通过容器获取,并设置BaseAddress为HttpQuartz.Server的部署地址
    using var client = new HttpClient {BaseAddress = new Uri("http://localhost:5000")};
    var httpQuartzClient = new HttpQuartzClient(client);

    //添加新任务(添加触发器),成功返回success字符串
    var result = await httpQuartzClient.ScheduleJob(new TriggerModel()
    {
        Key = new TriggerKeyModel("test", "test"),
        StartTime = DateTimeOffset.Now.AddSeconds(30),
        JobData = new JobDataInfo()
        {
            url = "http://www.baidu.com",
        },
        SimpleTrigger = new SimpleTriggerInfo()
        {
            RepeatInterval = TimeSpan.FromSeconds(10)
        },
    });

UI管理截图

任务列表

编辑任务

相关

Quartz.Net项目

Polly项目

LayUI项目

MIT License Copyright (c) 2019 loogn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于quartz.net的Http任务调度 展开 收起
C#
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C#
1
https://gitee.com/dqingqing/httpquartz.git
git@gitee.com:dqingqing/httpquartz.git
dqingqing
httpquartz
httpquartz
master

搜索帮助