hey-hoho / schedulemastercore Goto Github PK
View Code? Open in Web Editor NEWThis is a distributed task management system base on .Net Core platform .
License: Apache License 2.0
This is a distributed task management system base on .Net Core platform .
License: Apache License 2.0
建议已完成的功能加个使用说明
程序集任务,上传的程序包中的DLL不能和节点程序中的DLL冲突,导致任务编写繁杂,如果依赖的程序包过多,对引用版本号也有很多限制,是否由解决办法
响应码:500,请求地址:http://localhost:30002/health,响应消息:Cannot assign requested address Cannot assign requested address
通过浏览器访问 http://localhost:30002/health 是可以访问成功的。
还想请教您一下是什么问题导致的?
我用iis运行的程序,只有一个work节点,work1在运行十几分钟至几个小时不等的时间后work节点会自动处于下线状态,但在work1中重新连接,就恢复运行状态,查看错误日志,主要以下几种情况:
1.
master-node | 信息 | 2020-08-30 09:29:18 | health处理时间:46070 (health处理时间是我在检康检测的函数中加入计时功能)
2.
master-node | 异常 | 2020-08-30 18:42:42 | /System/NodeConnect,ERROR:A task was canceled
worker1连接异常:Unauthorized Connection.
希望增加 mongo 数据库支持
var sourcePath = $"{master.AccessProtocol}://{master.Host}/static/downloadpluginfile?pluginname={model.AssemblyName}";
var timeSpan = DateTime.Now.ToString("yyyyMMddHHmmssfff");
var zipPath = $"{ConfigurationCache.PluginPathPrefix}\\{model.AssemblyName}{timeSpan}.zip".ToPhysicalPath();
var pluginPath = $"{ConfigurationCache.PluginPathPrefix}\\{model.Id}".ToPhysicalPath();
using (WebClient client = new WebClient())
{
try
{
await client.DownloadFileTaskAsync(new Uri(sourcePath), zipPath);
}
catch (Exception ex)
{
LogHelper.Warn($"下载程序包异常,地址:{sourcePath}", model.Id);
throw ex;
}
}
//将指定 zip 存档中的所有文件都解压缩到各自对应的目录下
ZipFile.ExtractToDirectory(zipPath, pluginPath, true);
System.IO.File.Delete(zipPath);
ScheduleMasterCore默认是支持mysql数据库,对其他数据库是不支持;其实支持sqlserver还是很简单的操作,在AddDbContext中注入sqlserver 同时在RootJob中sql语句中的now() 替换成{DateTime.Now("yyyy-MM-dd hh:mm:ss")} 即可。
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Hos.ScheduleMaster.QuartzHost.Common.HosScheduleFactory.ConvertParamsJson(String source) in /home/nodyang/working/ScheduleMasterCore/src/ScheduleMasterCore/Hos.ScheduleMaster.QuartzHost/Common/HosScheduleFactory.cs:line 99
HOHO,你好。
请教一下,有没有什么思路解决当系统重启之后,任务列表项自动运行?
这能解决当任务项很多时,或者遇到服务器断电重启,不用再把任务列表全部手动点一遍开始。实现一种无人值守模式。
db数据库创建后和模型不匹配,总是有些字段没有
详见 RootJob.cs 文件下的38,89,120行
private void UpdateRunTrace(Guid traceId, double elapsed, ScheduleRunResult result)
{
if (traceId == Guid.Empty) return;
_db.Database.ExecuteSqlRaw($"update scheduletraces set result={(int)result},elapsedtime={elapsed},endtime=now() where traceid='{traceId}'");
}
表名修改之后(比如加上tb_) HTTP任务运行无响应
首先感谢您对项目的关注~
如果本项目有幸得到您的认可,正在使用或计划使用的麻烦提交一下相关信息,以鼓励作者把项目做得更好。这些信息仅用于统计项目使用情况,不作其他任何用途。
在本条Issue中跟帖提交即可,提交格式为:
所在城市:xxx
公司名称或简称:xxx
团队规模:xxx
使用状态:正在使用\计划使用
任务数量:xxx\xxx+
节点数量:xxx
感谢您的支持~
3个子节点,一个主节点,子节点无征兆下线,必须手动唤醒
ModelBuilderExtensions 文件中的数据好像没有起作用
==============================================
systemusers 初始化脚本没有数据 无法登录,需要自己添加用户
systemconfigs 脚本中乱码(编码不是 utf-8 ,而且 还原数据库时不能选中为 utf-8)
'Assembly_ImagePullPolicy', '³ÌÐò¼¯ÅäÖÃ', 'Îļþ°üÀÈ¡²ßÂÔ', 'IfNotPresent', '1', '1', 'Always-×ÜÊÇÀÈ¡£¬IfNotPresent-±¾µØûÓÐʱÀÈ¡£¬Ä¬ÈÏÊÇAlways', '2020-04-05 08:57:18.417000', '2020-04-05 17:12:09.487020', 'admin'
'Email_FromAccount', 'ÓʼþÅäÖÃ', '·¢¼þÈËÕ˺Å', '', '3', '1', 'seed by efcore auto migration', '2020-04-05 15:38:14.583060', '2020-04-05 17:12:09.492483', 'admin'
'Email_FromAccountPwd', 'ÓʼþÅäÖÃ', '·¢¼þÈËÕ˺ÅÃÜÂë', '', '4', '1', 'seed by efcore auto migration', '2020-04-05 15:38:14.583060', '2020-04-05 17:12:09.493020', 'admin'
'Email_SmtpPort', 'ÓʼþÅäÖÃ', 'Óʼþ·þÎñÆ÷¶Ë¿Ú', '25', '2', '1', 'seed by efcore auto migration', '2020-04-05 15:38:14.583053', '2020-04-05 17:12:09.491849', 'admin'
'Email_SmtpServer', 'ÓʼþÅäÖÃ', 'Óʼþ·þÎñÆ÷', '', '1', '1', 'seed by efcore auto migration', '2020-04-05 15:38:14.582863', '2020-04-05 17:12:09.491180', 'admin'
'Http_RequestTimeout', 'HTTPÅäÖÃ', 'ÇëÇó³¬Ê±Ê±¼ä', '10', '1', '1', 'µ¥Î»ÊÇÃ룬ĬÈÏÖµÊÇ10', '2020-04-08 06:48:48.201000', NULL, NULL
'System_WorkerUnHealthTimes', 'ϵͳÅäÖÃ', 'WorkerÔÊÐíÎÞÏìÓ¦´ÎÊý', '3', '1', '1', '½¡¿µ¼ì²éʧ°Ü´ïµ½×î´ó´ÎÊý»á±»ÏÂÏßÌÞ³ý£¬Ä¬ÈÏÖµÊÇ3', '2020-04-08 06:48:48.201000', NULL, NULL
每天都有这样的情况出现。只能重启才能链接。但服务是正常的。单独都可以访问
首先感谢作者在空闲时间对这个项目的付出 , 针对题目我有一些疑问希望跟作者共同探讨...
我想知道的是您有实验过直接使用dbstore来存储quartz的数据 , 然后多个worker共享db来实现上述的问题吗?( 其实内部也是采用dblock的方式 )
再次感谢您的开源付出!!!
能否通过持久化中间件,在部署时自动识别当前工作单元为master或worker,优化部署配置?
能否增加定时服务调度url地址执行任务呢
反复启停worker节点和调度任务,会导致worker节点异常退出和任务不能被正常调度,
操作步骤:
1、让worker节点正常工作,创建调度任务,并启动。
创建worker1和worker2,让这两个节点都能工作,让任务使用这连个节点调度;
2、先暂停worker1,让worker2调度任务,当worker2成功调度任务成功后在停用worker2节点;
3、启动worker1,这是任务在worker1节点就不能被调度了;同时大概率会出现worker1节点异常退出。
还有个bug:
当某个任务被设置为后置任务时,如该任务被删除,则带后置任务的节点将不能被编辑,是否能调度没有测试。
如题!k8s部署 不指定ip
例如 master 节点 在pod中的ip 和分配到那个k8s工作节点均不特别指定的情况下,master的ip如何设置?是设置为 k8s集ingress的 对外虚拟ip?
1.新增参数那可以参考postman,批量复制功能。
2.可以增加断言,而不是仅仅依靠响应状态判断执行成功与否
bug描述:http任务,请求方式为httpget, 创建任务时数据格式选择json-data, 由于是get请求所以数据内容不填。此种任务启动失败。
bug分析:异常在HttpTask类以下代码上抛出
if (httpOption.ContentType == "application/json") { requestBody = httpOption.Body.Replace("\r\n", ""); }
推测httpOption.Body应该是null,此时去查看数据库表 schedulehttpoptions 发现 body字段确实为 null
任务暂停时,响应码:503,请求地址:http://localhost:30001/api/quartz/resume?sid=d3d88288-89c7-4966-ab64-6b98a622e34d,响应消息:WebExceptionStatus: ProtocolError,The remote server returned an error: (400) Bad Request.
An exception occurred while iterating over the results of a query for context type 'Models.SmDbContext'.
请问下如何使用创建任务的时候设置的配置keyvalue?
通过解决方案调试可以登录,但是通过发布节点登录登录不了也不报错
需求描述:
我有一个服务A,提供一个定时调用的API。
微服务环境下服务A会启动3个实例,那么会向ScheduleMasterCore注册三次相同的任务但是API地址不一样
到了任务执行时希望只能调用任意一个实例的api的,如果api调用失败者调用其他实例的api,直到成功或者全失败;
如果能支持Consul发现服务那就最好
系统设置下的开关配置点击之后一直在加载,请问这个开关配置是控制什么的呢?
某个worker调度任务时通过DabaseLock.TryGetLock()将schedulelocks字段status设置为1表示获取到锁,
如果在没有执行DabaseLock.Dispose()方法之前worker崩溃意外退出;
这样会导致schedulelocks中的status没有设置为0,也就是锁没有被释放,当再次启动worker会发现任务永远不会被调度,因为DabaseLock.TryGetLock获取不到锁。
目前我临时的解决方法是在管理后台点击【停止】按钮时将该任务的锁释放掉。博主有好的解决方案没?
多租户使用一个任务调度,不同租户的数据是独立处理?还是不管租户的概念一起处理?
或者说如何能够降低租户之间的互相影响呢?
httpClient的时候出错=》One or more errors occurred. (A task was canceled.)
一直提示如题的错误,我把run简化到实例还是失败,程序集是netstandard2.1。帮忙分析一下,谢谢!
是否能在任务类型中添加对EXE和shell等方式的支持
http://localhost:30000/Login/Index
无法登陆 成功后也没不跳转,火狐测试没问题
Google Chrome
版本 81.0.4044.138(正式版本) (64 位)
1.看源码分页的总记录数是没有获取成功!
2.添加新用户按理只能查看自己的任务而并不是所有的任务
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.