1. 安装 go (略):
  2. 获取源码:
    go get github.com/job520/webcron
  3. 进入项目目录:
    cd ${GOPATH}/src/github.com/job520/webcron
  4. 修改配置文件:
    vim conf/app.conf
    appname = webcron
    httpport = 8000
    runmode = dev
    # 允许同时运行的任务数
    jobs.pool = 10
    # 站点名称
    site.name = 定时任务管理器
    # 数据库配置
    db.host = 127.0.0.1
    db.user = root
    db.password = xxxxx
    db.port = xxxx
    db.name = webcron
    db.prefix = t_
    db.timezone = Asia/Shanghai
    # 邮件服务器配置
    mail.queue_size = 100
    mail.from = no-reply@example.com
    mail.host = smtp.example.com
    mail.port = 25
    mail.user = username
    mail.password = your password
  5. 创建数据库:
    mysql -uroot -p -e "create database webcron"
  6. 导入sql语句:
    mysql -uroot -p -D webcron < install.sql
  7. 编译:
    go build main.go
  8. 运行:
    nohup ./main &> error.log &
  9. 默认账户名/密码:
    admin
    admin888
文档更新时间: 2020-08-08 20:40   作者:lee