iwannay / jiacrontab Goto Github PK
View Code? Open in Web Editor NEW简单可信赖的任务管理工具
License: Apache License 2.0
简单可信赖的任务管理工具
License: Apache License 2.0
在crontab中,类似于cd /data/home/CheckServerAlive && python dial.py 这样的脚本命令,是无法在jiacrontab进行配置的。可否添加该功能的支持?
公司最近使用,发现挺不错;但有的时候需要部署多套,每次都需要一个一个增加。
建议:
1、提供导入/导出功能
2、批量增加
虽然都很微弱到可以忽略不计, 但是作为24小时运行的服务器,还是会比较在意频繁写入对SSD寿命的影响以及在大型密集计算时这样的文件写入对磁盘IO时间以及CPU的影响.
在 Proxmox 的仪表盘中观察到是每1分钟都有固定的磁盘IO波动.
通过 inotifywait -rmq /root/jiacrontab/ -e modify 粗略观察到如下被修改的文件
/root/jiacrontab/client/.data/ MODIFY .swap
/root/jiacrontab/client/.data/ MODIFY .swap
/root/jiacrontab/server/.data/ MODIFY .swap
/root/jiacrontab/server/data/ MODIFY jiacrontab_server.db-journal
/root/jiacrontab/server/data/ MODIFY jiacrontab_server.db-journal
/root/jiacrontab/server/data/ MODIFY jiacrontab_server.db-journal
/root/jiacrontab/server/data/ MODIFY jiacrontab_server.db-journal
/root/jiacrontab/server/data/ MODIFY jiacrontab_server.db-journal
/root/jiacrontab/server/data/ MODIFY jiacrontab_server.db
点错
最近执行一个脚本,需要用到最后一天的命令,
发现好像不能支持L模式,
在crontab中是可以的,
如:0 0 L * * 每月的最后一天。
当然如果方便的话,建议把crontab的其他的一些命令也加入,
其他的一些命令
“/”:为特别单位,表示为“每”如“0/15”表示每隔15分钟执行一次,“0”表示为从“0”分开始, “3/20”表示表示每隔20分钟执行一次,“3”表示从第3分钟开始执行
“?”:表示每月的某一天,或第周的某一天
“L”:用于每月,或每周,表示为每月的最后一天,或每个月的最后星期几如“6L”表示“每月的最后一个星期五”
“W”:表示为最近工作日,如“15W”放在每月(day-of-month)字段上表示为“到本月15日最近的工作日”
“#”:是用来指定“的”每月第n个工作日,例 在每周(day-of-week)这个字段中内容为"6#3" or "FRI#3" 则表示“每月第三个星期五”
不知道是否支持以下:
背景:
两台web服务器;脚本只能由其中一台运行;不能两台都运行;但是两台都得配置;(防单点)
期望:
随机选择一台执行;另外一台挂掉以后,它会选择正常的那台执行;
当日志文件中只有一条数据的时候,选择倒序查询,会查询不到日志
有没有整体运行的流程图或者架构图,
对于强杀的话,怎么做到强杀的呢
1.脚本名称不支持中午和特殊符号啊
2.机器多的话没法寻找,希望有折叠、分组功能
3.邮件发送不通
Describe the bug
添加任务处 xss
To Reproduce
Steps to reproduce the behavior:
https://jiacrontab.iwannay.cn/daemon/task/list?addr=localhost%3a20001
添加多个邮箱通知时,提示@后面不能跟,
任务数据是存储到sqllite了吗
运行列表中上次执行列能否调整到创建日期列的地方
分辨率低的电脑,要拖动才能看到执行结果,不方便啊
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
停止不了脚本,只能删掉这个任务,但是不知道这样删除任务之后,是否有僵尸进程
比如我写了一个数据库备份的脚本,那这个脚本可以通过这个定时任务平台来管理么?
jiacrontab/pkg/pprof/pprof.go文件中cupprofile的名字写错了,应该是cpuprofile
原生的rpc太原生了。
没看到存储结构,历史操作记录如何存储的?
如果rpc通信失败怎么办,client是否直接脱离server的控制了?
感觉思路应该不错,实现过于草率,生产环境慎用。
初步看源码的结论,希望作者能整理出架构图和说明文档
在演示地址还有自己部署的页面上, 都没有找到添加节点的按钮啊?
如题,需要一份配置文件模板,谢谢
当日志输出只有一行的时候系统的后台没有记录日志代码如下:
这个是没有记录执行日志的
这个是有执行日志的 要在php脚本里增加换行符,才会正常显示日志执行记录Describe the bug
根据日志观察,需要比较长执行时间的任务(几分钟以上),似乎执行到一半会直接死掉,具体现象有:1)去主机上ps无法找到进程;2)jiacrontab_admin 控制台上显示执行成功,但会显示有1个进程,运行时间显示 0s;3)到了下个执行时间依然会执行,但始终是同样的结果。任务有配超时时间的(没有运行到超时时间),也有没配超时时间的,都没有设置超时处理,只允许一个进程执行,也没有收到任何报错处理。
是需要做什么配置吗?谢谢~
Test in the demo: http://jiacrontab.iwannay.cn/
User: admin Password: 123456
1.Log in
2.Add task
Modify the values of command and args, Read the passwd file.
command=cat&args=/etc/passwd
POST https://jiacrontab.iwannay.cn/crontab/task/edit?addr=localhost%3a20001 HTTP/1.1
Host: jiacrontab.iwannay.cn
Connection: keep-alive
Content-Length: 192
Cache-Control: max-age=0
Origin: https://jiacrontab.iwannay.cn
Upgrade-Insecure-Requests: 1
DNT: 1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: https://jiacrontab.iwannay.cn/crontab/task/edit?addr=localhost%3a20001
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9,ja;q=0.8,zh-TW;q=0.7
Cookie: access_token=
taskId=0&taskName=test&command=cat&args=/etc/passwd&execType=0&timeout=0&optimeout=kill&mailTo=jiacontab%40yopmail.com&apiTo=&maxConcurrent=1&minute=*&hour=*&day=*&month=*&weekday=*&sync=false
3. Successfully added and run this task
https://jiacrontab.iwannay.cn/crontab/task/quickStart?taskId=25&addr=localhost:20001
目前平台上设置了HTTP请求的300s超时,但对于一些长时间执行的操作(10min或更久),就会提示失败(但也许操作最后是成功执行的),希望可以加上Curl自定义超时时间的设置
运行这个也会报错 sudo ps -ef|grep python |grep -E 'timing_sync_setting_files.py' |awk '{print "kill -9 "$2}' |sh
error: unsupported SysV option
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
[192.168.15.103:20003 kill timing_sync_setting_files.py] exit status 1
Describe the bug
是否支持容器化和反向代理部署
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
api报警能否以变量的形式获取主机IP和脚本名称
在调用api报警时能否以变量的形式获取报警主机ip和脚本名称
比如以下api
http://12.16.13.11:88?touser=YangShengLin&subject=crontab&message=172.16.136.142+test
message为报警内容:IP地址和脚本名称能否以变量的形式获取当前主机和脚本名称
win下使用时候
log默认保存得编码为GB2312
web读取日志时乱码
首先非常感谢作者的辛勤付出,以下个人愚见,希望有时间瞅瞅
① 希望能展示 脚本执行的次数
② server配置邮件时,希望增加协议自定义(如SSL/TLS),企业邮箱基本都是加密服务,而且阿里云25端口忒麻烦
③增加 已添加的 crontab配置的导入导出备份/恢复
④批量模式下,可以按 状态排序,如果计划任务比较多,状态 开启和关闭的就会显示的比较乱
⑤界面增加任务执行成功或者失败的标示
⑥日志写在文件里终究不太好,建议使用mongodb
① 添加新任务时选择取消 ,无任何反应,取消按钮不生效
② 貌似脚本不支持管道啊(如 ps -ef|grep nginx) 之类的,server.ini设置command 支持ps后也不行
① 已编译的包貌似在macos下无法运行,提示 ./server: ./server: cannot execute binary file
不支持shell脚本?
你好,此版本依赖GLIBC 2.14,现在我们大部分环境还都是GLIBC 2.12,这样适配性是不是很不方便,有什么好的解决方法么
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
在admin的配置文件里看了,没有找到对应的账号密码.
建议兼容主要go版本。
添加任务提交后没有保存WorkUser 字段
提交保存表单部分字段
retryNum: 0
workDir: ""
workEnv: []
workUser: "www"
保存逻辑
https://github.com/iwannay/jiacrontab/blob/master/jiacrontab_admin/daemon.go
daemonJob = models.DaemonJob{
Name: reqBody.Name,
GroupID: ctx.claims.GroupID,
ErrorMailNotify: reqBody.ErrorMailNotify,
ErrorAPINotify: reqBody.ErrorAPINotify,
MailTo: reqBody.MailTo,
APITo: reqBody.APITo,
UpdatedUserID: ctx.claims.UserID,
UpdatedUsername: ctx.claims.Username,
Command: reqBody.Command,
WorkDir: reqBody.WorkDir,
WorkEnv: reqBody.WorkEnv,
Code: reqBody.Code,
RetryNum: reqBody.RetryNum,
FailRestart: reqBody.FailRestart,
Status: models.StatusJobUnaudited,
}
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
A clear and concise description of what the bug is.
发现脚本超时的强杀功能不管用,并且这个功能好像无法勾选,勾选上然后保存,之后再打开发现还是没有勾选的状态。
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
修改job后,前一次调度计划会执行一次后才停止
源码不能放在 $GOPATH/src目录下
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
计划任务有执行失败的主机能标红么?
一个主机上 有多个计划任务,如果一个任务失败了,
在主机列表能标红执行任务失败主机的么?
后台设置的最大运行数量是 1, 但是 会同时运行2个进程
建议支持脚本的同时支持上API调用的方式来调用API执行对应的任务,并针对API的状态码判断任务的执行结果
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.