# 定时任务golang **Repository Path**: tim_123/task-job ## Basic Information - **Project Name**: 定时任务golang - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-20 - **Last Updated**: 2024-03-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 运行 ```shell ./src 127.0.0.1 80eca2xxxxx task-prod DEFAULT_GROUP 8848 ./src 127.0.0.1 80eca2xxxxx task-prod nohup ./src 127.0.0.1 80eca26c-8xxxx task-prod >logs/task.out 2>&1 & nohup ./task-job-linux 127.0.0.1 80eca26c-xxx task-prod >logs/task_go.out 2>&1 & - 127.0.0.1 为nacos 地址 - 80eca26c-xxx 为空间id - task-prod 为Data ID # 打包 ```shell CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build task-job-linux.go CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build task-job-linux.go ``` # 配置 ``` taskBean: test: 1 jobBeans: - tGroup: backend-pro tCode: childNum url: http://127.0.0.1:9080/dev-api/task/initUserChildNum taskTime: "0 0/10 * * * ?" taskType: prod param: isOpen: true - tGroup: backend-pro tCode: childNum1 url: http://127.0.0.1:9080/dev-api/task/initOnePlayLock taskTime: "0 0/5 * * * ?" taskType: prod param: isOpen: true - tGroup: backend-pro tCode: childNum2 url: http://127.0.0.1:9080/dev-api/task/initDay taskTime: "0 0 21 * * ?" taskType: prod param: isOpen: true - tGroup: backend-pro tCode: upDateReservation url: http://127.0.0.1:9080/dev-api/task/upDateReservation taskTime: "0 0 9 * * ?" taskType: prod param: isOpen: true - tGroup: backend-pro tCode: upVersionOn url: http://127.0.0.1:9080/dev-api/task/upVersionOn taskTime: "0 0 21 * * ?" taskType: prod param: isOpen: true test: aaaaa ```