{"id":20052423,"url":"https://github.com/hyperjiang/xxljob","last_synced_at":"2026-01-05T11:17:48.835Z","repository":{"id":228770534,"uuid":"774235926","full_name":"hyperjiang/xxljob","owner":"hyperjiang","description":"XXL-JOB golang executor","archived":false,"fork":false,"pushed_at":"2024-03-21T06:11:54.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T21:09:25.432Z","etag":null,"topics":["executor","job","xxl-job"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperjiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-19T07:28:39.000Z","updated_at":"2024-03-25T01:57:00.000Z","dependencies_parsed_at":"2024-03-20T11:48:51.438Z","dependency_job_id":"00141a04-d743-41e0-9078-592d565e4454","html_url":"https://github.com/hyperjiang/xxljob","commit_stats":null,"previous_names":["hyperjiang/xxljob"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjiang%2Fxxljob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjiang%2Fxxljob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjiang%2Fxxljob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperjiang%2Fxxljob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperjiang","download_url":"https://codeload.github.com/hyperjiang/xxljob/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241482059,"owners_count":19969847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["executor","job","xxl-job"],"created_at":"2024-11-13T12:17:38.232Z","updated_at":"2026-01-05T11:17:48.802Z","avatar_url":"https://github.com/hyperjiang.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xxljob\n\n[![GoDoc](https://pkg.go.dev/badge/github.com/hyperjiang/xxljob)](https://pkg.go.dev/github.com/hyperjiang/xxljob)\n[![CI](https://github.com/hyperjiang/xxljob/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/hyperjiang/xxljob/actions/workflows/ci.yml)\n[![](https://goreportcard.com/badge/github.com/hyperjiang/xxljob)](https://goreportcard.com/report/github.com/hyperjiang/xxljob)\n[![codecov](https://codecov.io/gh/hyperjiang/xxljob/branch/main/graph/badge.svg)](https://codecov.io/gh/hyperjiang/xxljob)\n[![Release](https://img.shields.io/github/release/hyperjiang/xxljob.svg)](https://github.com/hyperjiang/xxljob/releases)\n\nXXL-JOB golang executor is a standalone http server which manages the connection with XXL-JOB server.\n\nThe default port is 9999. It registers itself as a node in XXL-JOB server, listens and handles the calls from XXL-JOB server.\n\nA golang executor can run multiple jobs concurrently, but each job is run in serial mode, which is strictly following the design pattern of XXL-JOB:\n\n\u003e XXL-JOB的不同任务之间并行调度、并行执行。\n\u003e XXL-JOB的单个任务，针对多个执行器是并行运行的，**针对单个执行器是串行执行的**。同时支持任务终止。\n\nSee [5.4.5 并行调度](https://github.com/xuxueli/xxl-job/blob/72963e4716a74eacdcbdd2e999c433debf3afaa3/doc/XXL-JOB%E5%AE%98%E6%96%B9%E6%96%87%E6%A1%A3.md#545-%E5%B9%B6%E8%A1%8C%E8%B0%83%E5%BA%A6)\n\n## Prerequisite\n\ngo version \u003e= 1.16\n\n## Installation\n\n```\ngo get -u github.com/hyperjiang/xxljob\n```\n\n## Usage\n\n### 1. Start the executor\n\n```go\nimport \"github.com/hyperjiang/xxljob\"\n\nconst (\n\tappName     = \"xxl-job-executor-sample\"\n\taccessToken = \"default_token\"\n\thost        = \"localhost:8080/xxl-job-admin\"\n\tdemoHandler = \"demoJobHandler\"\n)\n\ne := xxljob.NewExecutor(\n    xxljob.WithAppName(appName),\n    xxljob.WithAccessToken(accessToken),\n    xxljob.WithHost(host),\n)\n\n// start in goroutine\ngo e.Start()\n```\n### 2. Add job handler\n\nJob handlers are functions that implement `xxljob.JobHandler` (that is `func(ctx context.Context, param xxljob.JobParam) error`).\n\n```go\ne.AddJobHandler(demoHandler, func(ctx context.Context, param xxljob.JobParam) error {\n    fmt.Println(param.Params)\n    return nil\n})\n```\n\n### 3. Stop the executor\n\n```go\ne.Stop()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjiang%2Fxxljob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperjiang%2Fxxljob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperjiang%2Fxxljob/lists"}