Giter VIP home page Giter VIP logo

webcron's Introduction

webcron


一个定时任务管理器,基于Go语言和beego框架开发。用于统一管理项目中的定时任务,提供可视化配置界面、执行日志记录、邮件通知等功能,无需依赖*unix下的crontab服务。

项目背景

开发此项目是为了解决本人所在公司的PHP项目中定时任务繁多,使用crontab不好管理的问题。我所在项目的定时任务也是PHP编写的,属于整个项目的一部分,我希望能有一个系统可以统一配置这些定时任务,并且可以查看每次任务的执行情况,任务执行完成或失败能够自动邮件提醒开发人员,因此做了这个项目。

功能特点

  • 统一管理多种定时任务。
  • 秒级定时器,使用crontab的时间表达式。
  • 可随时暂停任务。
  • 记录每次任务的执行结果。
  • 执行结果邮件通知。

界面截图

webcron

安装说明

系统需要安装Go和MySQL。

获取源码

$ go get github.com/lisijie/webcron

打开配置文件 conf/app.conf,修改相关配置。

创建数据库webcron,再导入install.sql

$ mysql -u username -p -D webcron < install.sql

运行

$ ./webcron
或
$ nohup ./webcron 2>&1 > error.log &
设为后台运行

访问:

http://localhost:8000

帐号:admin 密码:admin888

webcron's People

Contributors

lisijie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webcron's Issues

内存泄露

启动时候占用内存30多M,启动几个定时任务,放着两天内存占用到700M了。

数据库配置正常运行不起来

错误:
register db Ping default, Error 1045: Access denied for user ''@'localhost' (using password: NO)
must have one register DataBase alias named default
原因:使用go install安装到全局了,配置好在安装也不会覆盖,需要删除path里go/bin下生成的exe文件

undefined: syscall.Statfs

win7下执行命令:go get github.com/lisijie/webcron
如下错误:

C:\Users\vsunger>go get github.com/lisijie/webcron

github.com/lisijie/webcron/app/libs

C:\gowks\wks\src\github.com\lisijie\webcron\app\libs\sys.go:15: undefined: syscall.Statfs_t
C:\gowks\wks\src\github.com\lisijie\webcron\app\libs\sys.go:16: undefined: syscall.Statfs

The shell script writes the log file, lacks information, and some can not write?

The shell script writes the log file, lacks information, and some can not write

shell script

#!/bin/bash
logs_path="/home/www/bin/"
TIME=`date '+%Y-%m-%d %H:%M:%S'`
GO=$(redis-cli -h 127.0.0.1 -p 63789  -a  tinywan -n 12 get Golang)
echo " Redis Crontab  [ ${TIME} ]:: ${GO}"  >> ${logs_path}crontab_redis_10.log
echo "[$TIME]-[BeginTime]:${GO}" >> ${logs_path}crontab_redis_12.log

crontab_redis_10.log

  • crontab writing
 :: tinywan_golang17-06-02 10:15:30
 :: tinywan_golang17-06-02 10:16:00
 :: tinywan_golang17-06-02 10:16:30
  • I want the result is
  Redis Crontab [ 17-06-02 10:15:30 ] :: tinywan_golang
  • If i do it is the result I want
echo " Redis Crontab [ " $(date '+%Y-%m-%d %H:%M:%S') " ] ::" $GO  >> /home/www/bin/crontab_redis_12.log

./webcron

怎么修改让监听指定网卡上啊 现在看到监听是在tcp6上无法访问

must have one register DataBase alias named `default`

错误:
[root@408cb45436b1 opt]# /home/go/bin/webcron
[ORM]register db Ping default, dial tcp :3306: getsockopt: connection refused
must have one register DataBase alias named default

mysql -hX.X.X.X -uXXX -p 可以通

请问怎么解决?

环境:
Linux version 3.10.0-327.el7.x86_64 ([email protected]) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Nov 19 22:10:57 UTC 2015
go version go1.6.2 linux/amd64

邮件发送地址异常

您发送的邮件被退回,相关信息如下:
发件人:mail@***.com
主题:任务执行结果通知 #2: 成功
原文:邮件原文包含在附件中。
时间:Sun, 23 Oct 2016 15:00:05 +0800

无法发送到[email protected]
系统应答:(9)connect to the "93.184.216.34(93.184.216.34) of example.com" server failed
退信原因:连接收件方邮件系统失败,导致邮件被系统退回。
解决建议:1.请联系收件方确认是否设置相关的拒收策略,或添加了黑名单等设置;2. 请稍后重新尝试发送。

在接收通知的文本域写上了对应的接收地址后,第一封邮件是OK的,但是后面的就收不到了,过不久会收到这样的退回邮件。

添加task即刻添加job,为啥job里没有激活

想写个接口,添加一个task的时候,顺便就激活,直接把task.go里的Add、Start方法合并, 为啥job里就是加不进去呢,重启就可以;感觉这时的job添加是在一个新的snapshot(任务快照里),而原本的任务快照没有更新

执行脚本样例

你好,请问支持的脚本是shell脚本吗?可以提供一个样例吗?可以支持定时执行自定义的方法吗?

webcron与现有定时执行脚本怎么沟通

webcron与现有的定时,怎么进行通讯的, 是需要把之前的定时任务脚本迁移出来,还是,基于一种通讯机制,在需要执行的时候,通知原有定时任务脚本执行呢

运行报错,退出

之前运行 几个月都没有问题, 最近 几乎每天都有异常退出。

机器内存 8G ,目前 只用了不到2G。 不可能 内存不足。

2016/09/01 20:37:00 �[1;34m[job.go:116][D] 开始执行任务: 7 �[0m
[ORM] - 2016-09-01 20:37:00 - [Queries/default] - [ OK / db.Exec / 2.1ms] - [INSERT INTO t_task_log (task_id, output, error, status, process_time, create_time) VALUES (?, ?, ?, ?, ?, ?)] - 7, ``,exec: not started:,`-1`,`5`,`1472733420`
[ORM] - 2016-09-01 20:37:00 - [Queries/default] - [ OK / db.Exec / 1.7ms] - [UPDATE`t_task`SET`prev_time`= ?,`execute_times`= ? WHERE`id`= ?] -`1472733420`,`65751`,`7`
[ORM] - 2016-09-01 20:37:00 - [Queries/default] - [ OK / db.Query / 1.0ms] - [SELECT T0.`id`, T0.`user_name`, T0.`password`, T0.`salt`, T0.`email`, T0.`last_login`, T0.`last_ip`, T0.`status`FROM`t_user`T0 WHERE T0.`id`= ? LIMIT 1000] -`1`
2016/09/01 20:37:50 �[1;33m[job.go:99][W] 任务[1]上一次执行尚未结束,本次被忽略。 �[0m
2016/09/01 20:38:00 �[1;34m[job.go:116][D] 开始执行任务: 7 �[0m
2016/09/01 20:38:00 �[1;33m[init.go:32][W] 任务执行时间超过300秒,进程将被强制杀掉: 26178 �[0m
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0x964fd6, 0x16)
/usr/local/go/src/runtime/panic.go:566 +0x95
runtime.sysMap(0xc520600000, 0x7c990000, 0x7f5a04065c00, 0xbe4398)
/usr/local/go/src/runtime/mem_linux.go:219 +0x1d0
runtime.(_mheap).sysAlloc(0xbcae40, 0x7c990000, 0x7f5a041cb968)
/usr/local/go/src/runtime/malloc.go:407 +0x37a
runtime.(_mheap).grow(0xbcae40, 0x3e4c8, 0x0)
/usr/local/go/src/runtime/mheap.go:726 +0x62
runtime.(_mheap).allocSpanLocked(0xbcae40, 0x3e4c8, 0xc420178c00)
/usr/local/go/src/runtime/mheap.go:630 +0x4f2
runtime.(_mheap).alloc_m(0xbcae40, 0x3e4c8, 0x100000000, 0xc420366940)
/usr/local/go/src/runtime/mheap.go:515 +0xe0
runtime.(_mheap).alloc.func1()
/usr/local/go/src/runtime/mheap.go:579 +0x4b
runtime.systemstack(0x7f5a04065da8)
/usr/local/go/src/runtime/asm_amd64.s:314 +0xab
runtime.(_mheap).alloc(0xbcae40, 0x3e4c8, 0x100000000, 0x7f5a04065e20)
/usr/local/go/src/runtime/mheap.go:580 +0x73
runtime.largeAlloc(0x7c990000, 0x453100, 0xc420402680)
/usr/local/go/src/runtime/malloc.go:774 +0x93
runtime.mallocgc.func1()
/usr/local/go/src/runtime/malloc.go:669 +0x3e
runtime.systemstack(0xc42001e000)
/usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
/usr/local/go/src/runtime/proc.go:1079

goroutine 8558 [running]:
runtime.systemstack_switch()
/usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420537738 sp=0xc420537730
runtime.mallocgc(0x7c990000, 0x0, 0xc420537800, 0x411dbd)
/usr/local/go/src/runtime/malloc.go:670 +0x903 fp=0xc4205377d8 sp=0xc420537738
runtime.growslice(0x8a99c0, 0xc420541d00, 0x32, 0x40, 0x7c98ea0a, 0x0, 0x412fd2, 0xc4205378d8)
/usr/local/go/src/runtime/slice.go:126 +0x24e fp=0xc420537868 sp=0xc4205377d8
fmt.(_fmt).padString(0xc420188640, 0xc4205c4000, 0x7c98e9d8)
/usr/local/go/src/fmt/format.go:110 +0x112 fp=0xc4205378f0 sp=0xc420537868
fmt.(_fmt).fmt_s(0xc420188640, 0xc4205c4000, 0x7c98e9d8)
/usr/local/go/src/fmt/format.go:328 +0x61 fp=0xc420537928 sp=0xc4205378f0
fmt.(_pp).fmtString(0xc420188600, 0xc4205c4000, 0x7c98e9d8, 0xc400000073)
/usr/local/go/src/fmt/print.go:433 +0xea fp=0xc420537960 sp=0xc420537928
fmt.(_pp).printArg(0xc420188600, 0x8a9700, 0xc420400350, 0x73)
/usr/local/go/src/fmt/print.go:658 +0xc1d fp=0xc420537a58 sp=0xc420537960
fmt.(_pp).doPrintf(0xc420188600, 0x974092, 0x34, 0xc420537f78, 0x2, 0x2)
/usr/local/go/src/fmt/print.go:985 +0x123d fp=0xc420537b40 sp=0xc420537a58
fmt.Sprintf(0x974092, 0x34, 0xc420537f78, 0x2, 0x2, 0xbc57e0, 0x463c0c5445)
/usr/local/go/src/fmt/print.go:196 +0x6a fp=0xc420537b98 sp=0xc420537b40
github.com/lisijie/webcron/app/jobs.(_Job).Run(0xc420167880)
/home/sen/dev/go/src/github.com/lisijie/webcron/app/jobs/job.go:143 +0x1571 fp=0xc420537fa8 sp=0xc420537b98
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc420537fb0 sp=0xc420537fa8
created by github.com/lisijie/cron.(*Cron).run
/home/sen/dev/go/src/github.com/lisijie/cron/cron.go:168 +0x43a

goroutine 1 [chan receive, 1189 minutes]:
github.com/astaxie/beego.(*App).Run(0xc420013620)
/home/sen/dev/go/src/github.com/astaxie/beego/app.go:182 +0x5ed
github.com/astaxie/beego.Run(0x0, 0x0, 0x0)
/home/sen/dev/go/src/github.com/astaxie/beego/beego.go:66 +0x51
main.main()
/home/sen/sbin/webcron/main.go:44 +0x5d2

goroutine 17 [syscall, 1189 minutes, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1

goroutine 5 [syscall, 1189 minutes]:
os/signal.signal_recv(0x0)
/usr/local/go/src/runtime/sigqueue.go:116 +0x157
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.1
/usr/local/go/src/os/signal/signal_unix.go:28 +0x41

goroutine 6 [chan receive, 2 minutes]:
github.com/lisijie/webcron/app/mail.init.1.func1()
/home/sen/dev/go/src/github.com/lisijie/webcron/app/mail/mail.go:33 +0x69
created by github.com/lisijie/webcron/app/mail.init.1
/home/sen/dev/go/src/github.com/lisijie/webcron/app/mail/mail.go:42 +0x3df

goroutine 7 [select]:
github.com/lisijie/cron.(_Cron).run(0xc42001df40)
/home/sen/dev/go/src/github.com/lisijie/cron/cron.go:161 +0xa0e
created by github.com/lisijie/cron.(_Cron).Start
/home/sen/dev/go/src/github.com/lisijie/cron/cron.go:136 +0x43

goroutine 19 [chan receive, 1189 minutes]:
database/sql.(*DB).connectionOpener(0xc42018e000)
/usr/local/go/src/database/sql/sql.go:730 +0x4a
created by database/sql.Open
/usr/local/go/src/database/sql/sql.go:493 +0x1e9

goroutine 35 [IO wait, 521 minutes]:
net.runtime_pollWait(0x7f5a041c7f00, 0x72, 0x0)
/usr/local/go/src/runtime/netpoll.go:160 +0x59
net.(_pollDesc).wait(0xc4203d7cd0, 0x72, 0xc420037cd0, 0xc4200121c0)
/usr/local/go/src/net/fd_poll_runtime.go:73 +0x38
net.(_pollDesc).waitRead(0xc4203d7cd0, 0xb9c960, 0xc4200121c0)
/usr/local/go/src/net/fd_poll_runtime.go:78 +0x34
net.(_netFD).accept(0xc4203d7c70, 0x0, 0xb9b1e0, 0xc42021f3c0)
/usr/local/go/src/net/fd_unix.go:419 +0x238
net.(_TCPListener).accept(0xc420184740, 0x29e8d60800, 0x0, 0x0)
/usr/local/go/src/net/tcpsock_posix.go:132 +0x2e
net.(_TCPListener).AcceptTCP(0xc420184740, 0xc420037df8, 0xc420037e00, 0xc420037df0)
/usr/local/go/src/net/tcpsock.go:209 +0x49
net/http.tcpKeepAliveListener.Accept(0xc420184740, 0x9abf68, 0xc420191380, 0xba0de0, 0xc4203ed8c0)
/usr/local/go/src/net/http/server.go:2608 +0x2f
net/http.(_Server).Serve(0xc42007c300, 0xba0720, 0xc420184740, 0x0, 0x0)
/usr/local/go/src/net/http/server.go:2273 +0x1ce
net/http.(_Server).ListenAndServe(0xc42007c300, 0x966b41, 0x19)
/usr/local/go/src/net/http/server.go:2219 +0xb4
github.com/astaxie/beego.(_App).Run.func4(0xc420013620, 0xc420406298, 0x6, 0xc4203d7c00)
/home/sen/dev/go/src/github.com/astaxie/beego/app.go:174 +0x326
created by github.com/astaxie/beego.(*App).Run
/home/sen/dev/go/src/github.com/astaxie/beego/app.go:180 +0x629

goroutine 8547 [syscall, 6 minutes]:
syscall.Syscall(0x0, 0x7, 0xc42024a0cf, 0x531, 0x39, 0x56a, 0x0)
/usr/local/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0x7, 0xc42024a0cf, 0x531, 0x531, 0x39, 0x0, 0x0)
/usr/local/go/src/syscall/zsyscall_linux_amd64.go:783 +0x55
syscall.Read(0x7, 0xc42024a0cf, 0x531, 0x531, 0x39, 0x0, 0x0)
/usr/local/go/src/syscall/syscall_unix.go:161 +0x49
os.(_File).read(0xc420184188, 0xc42024a0cf, 0x531, 0x531, 0x39, 0x0, 0x0)
/usr/local/go/src/os/file_unix.go:228 +0x4f
os.(_File).Read(0xc420184188, 0xc42024a0cf, 0x531, 0x531, 0x39, 0x0, 0x0)
/usr/local/go/src/os/file.go:101 +0x59
bytes.(_Buffer).ReadFrom(0xc4203d6690, 0xb9b0e0, 0xc420184188, 0xc420318e88, 0xc420403b01, 0x4)
/usr/local/go/src/bytes/buffer.go:176 +0x155
io.copyBuffer(0xb99c60, 0xc4203d6690, 0xb9b0e0, 0xc420184188, 0x0, 0x0, 0x0, 0xc4201e5d38, 0x2, 0x2)
/usr/local/go/src/io/io.go:384 +0x323
io.Copy(0xb99c60, 0xc4203d6690, 0xb9b0e0, 0xc420184188, 0x8a5380, 0xc4201e5ce0, 0xc420318f90)
/usr/local/go/src/io/io.go:360 +0x68
os/exec.(_Cmd).writerDescriptor.func1(0x8a5380, 0xc4201e5ce0)
/usr/local/go/src/os/exec/exec.go:253 +0x4d
os/exec.(_Cmd).Start.func1(0xc42007ac60, 0xc4203afbe0)
/usr/local/go/src/os/exec/exec.go:370 +0x27
created by os/exec.(_Cmd).Start
/usr/local/go/src/os/exec/exec.go:371 +0x4db

goroutine 8549 [chan receive, 6 minutes]:
os/exec.(*Cmd).Wait(0xc42007ac60, 0xc4201e5860, 0xc42028ef90)
/usr/local/go/src/os/exec/exec.go:442 +0x124
github.com/lisijie/webcron/app/jobs.runCmdWithTimeout.func1(0xc4202660c0, 0xc42007ac60)
/home/sen/dev/go/src/github.com/lisijie/webcron/app/jobs/init.go:26 +0x2b
created by github.com/lisijie/webcron/app/jobs.runCmdWithTimeout
/home/sen/dev/go/src/github.com/lisijie/webcron/app/jobs/init.go:27 +0x7f

goroutine 8548 [syscall, 6 minutes]:
syscall.Syscall(0x0, 0xa, 0xc42024a6b7, 0x549, 0x2e, 0x577, 0x0)
/usr/local/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0xa, 0xc42024a6b7, 0x549, 0x549, 0x2e, 0x0, 0x0)
/usr/local/go/src/syscall/zsyscall_linux_amd64.go:783 +0x55
syscall.Read(0xa, 0xc42024a6b7, 0x549, 0x549, 0x2e, 0x0, 0x0)
/usr/local/go/src/syscall/syscall_unix.go:161 +0x49
os.(_File).read(0xc4201841a0, 0xc42024a6b7, 0x549, 0x549, 0x2e, 0x0, 0x0)
/usr/local/go/src/os/file_unix.go:228 +0x4f
os.(_File).Read(0xc4201841a0, 0xc42024a6b7, 0x549, 0x549, 0x2e, 0x0, 0x0)
/usr/local/go/src/os/file.go:101 +0x59
bytes.(_Buffer).ReadFrom(0xc4203d6700, 0xb9b0e0, 0xc4201841a0, 0xc420023688, 0x40f501, 0xc420023690)
/usr/local/go/src/bytes/buffer.go:176 +0x155
io.copyBuffer(0xb99c60, 0xc4203d6700, 0xb9b0e0, 0xc4201841a0, 0x0, 0x0, 0x0, 0xc4201e5cd8, 0x0, 0x0)
/usr/local/go/src/io/io.go:384 +0x323
io.Copy(0xb99c60, 0xc4203d6700, 0xb9b0e0, 0xc4201841a0, 0x8a5380, 0xc4201e5c80, 0xc420023790)
/usr/local/go/src/io/io.go:360 +0x68
os/exec.(_Cmd).writerDescriptor.func1(0x8a5380, 0xc4201e5c80)
/usr/local/go/src/os/exec/exec.go:253 +0x4d
os/exec.(_Cmd).Start.func1(0xc42007ac60, 0xc4203afc60)
/usr/local/go/src/os/exec/exec.go:370 +0x27
created by os/exec.(_Cmd).Start
/usr/local/go/src/os/exec/exec.go:371 +0x4db

goroutine 8546 [select, 8 minutes]:
github.com/lisijie/webcron/app/jobs.runCmdWithTimeout(0xc42007ac60, 0x4e94914f0000, 0x0, 0x2, 0x2)
/home/sen/dev/go/src/github.com/lisijie/webcron/app/jobs/init.go:30 +0x528
github.com/lisijie/webcron/app/jobs.NewCommandJob.func1(0x4e94914f0000, 0x975d5, 0xbc57e0, 0x8a9700, 0xc420461830, 0xc4203afb00, 0x15, 0x0)
/home/sen/dev/go/src/github.com/lisijie/webcron/app/jobs/job.go:74 +0x154
github.com/lisijie/webcron/app/jobs.(_Job).Run(0xc420174600)
/home/sen/dev/go/src/github.com/lisijie/webcron/app/jobs/job.go:129 +0x255
created by github.com/lisijie/cron.(_Cron).run
/home/sen/dev/go/src/github.com/lisijie/cron/cron.go:168 +0x43a

goroutine 8616 [running]:
goroutine running on other thread; stack unavailable
created by github.com/lisijie/cron.(*Cron).run
/home/sen/dev/go/src/github.com/lisijie/cron/cron.go:168 +0x43a
nohup: ignoring input
nohup: failed to run command `exec': No such file or directory

小白使用方式补充

  1. go get github.com/lisijie/webcron操作完了之后,会在/root/go/目录存在。
  2. 进入/root/go/github.com/lisijie/webcron目录后执行go build会生成webcron执行程序。
  3. conf/app.conf配置文件中runmode参数可以指定为“dev”或“prod”,区别是有debug和无debug区别。

请教:怎么将beego的项目部署在服务器上对外

首次使用beego写应用(也是go新手),不知道如何在服务器上部署对外,看官网的资料特别少。想请教一下您。比如需要先打包么,怎么打?打包后复制到服务器的话,服务器上需要安装bee工具么等等。如果您知道的话,麻烦告知一下

运行./webcron在地址栏输入IP

beego:can't find templatefile in the path:views/main/login.html
Request Method: GET

Request URL: /login
RemoteAddr: IP
Stack
/usr/local/go/src/runtime/asm_amd64.s:509
/usr/local/go/src/runtime/panic.go:491
/root/go/src/github.com/astaxie/beego/template.go:73
/root/go/src/github.com/astaxie/beego/controller.go:263
/root/go/src/github.com/astaxie/beego/controller.go:214
/root/go/src/github.com/astaxie/beego/controller.go:194
/root/go/src/github.com/astaxie/beego/router.go:827
/usr/local/go/src/net/http/server.go:2619
/usr/local/go/src/net/http/server.go:1801
/usr/local/go/src/runtime/asm_amd64.s:2337

无法添加定时脚本

添加定时任务脚本,点击保存没有反应,后台也不报错,是什么原因啊

无法停止脚本

我执行了一个很简单的脚本,

<?php
    echo "start:   " . time() . "\n";
    sleep(3);
    echo "end:     " . time() . "\n";

执行一会儿之后点击暂停无法停止
点击暂停后的http是302
image

发邮件报错

[E] [mail.go:38] SendMail: mail: missing phrase
请问是什么导致的?
谢谢

数据库配置正确,程序启动不起来

错误:
register db Ping default, Error 1045: Access denied for user ''@'localhost' (using password: NO)
must have one register DataBase alias named default
说明:
配置文件里配置了用户为root,host为127.0.0.1,数据库没有密码,端口为3306,是不是bug

锁阻塞后续任务

选择同一个任务只能有一个实例时,第一个任务执行时,后续任务会全部阻塞住,而不是忽略、
比如:
任务为sleep(10)
任务频率为1s
那么第一个任务会阻塞住全部后续任务。10秒后第二个任务执行,而后续还有9个任务在等待。

安装失败,报undefined: beego.URLFor

github.com/lisijie/webcron/app/controllers

gocode/src/github.com/lisijie/webcron/app/controllers/base.go:60: undefined: beego.URLFor
gocode/src/github.com/lisijie/webcron/app/controllers/base.go:73: this.TplName undefined (type *BaseController has no field or method TplName)
gocode/src/github.com/lisijie/webcron/app/controllers/base.go:105: this.ServeJSON undefined (type *BaseController has no field or method ServeJSON)
gocode/src/github.com/lisijie/webcron/app/controllers/group.go:25: undefined: beego.URLFor
gocode/src/github.com/lisijie/webcron/app/controllers/main.go:97: undefined: beego.URLFor
gocode/src/github.com/lisijie/webcron/app/controllers/main.go:101: undefined: beego.URLFor
gocode/src/github.com/lisijie/webcron/app/controllers/main.go:110: undefined: beego.URLFor
gocode/src/github.com/lisijie/webcron/app/controllers/main.go:149: undefined: beego.URLFor
gocode/src/github.com/lisijie/webcron/app/controllers/main.go:153: undefined: beego.URLFor
gocode/src/github.com/lisijie/webcron/app/controllers/main.go:157: this.TplName undefined (type *MainController has no field or method TplName)
gocode/src/github.com/lisijie/webcron/app/controllers/main.go:157: too many errors

运行错误

直接在ide里面运行main.go.不能获取到数据库连接[ORM]register db Ping default, dial tcp :3306: connectex: The requested address is not valid in its context.
:@tcp(:3306)/?charset=utf8must have one register DataBase alias named default
exit status 2

邮件发送报错

发送邮件时报错:[E] [mail.go:38] SendMail: 504 5.7.4 Unrecognized authentication type
查资料说是go不支持我们的邮件服务支持,请问有什么办法可以解决吗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.