├── .dockerignore ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml ├── pull_request_template.md └── workflows │ ├── autogen.yaml │ ├── codeql-analysis.yml │ ├── main.yml │ └── release.yml ├── .gitignore ├── .gitmodules ├── .goreleaser.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── COMM-LICENSE ├── Dockerfile ├── Dockerfile.light.hub ├── Dockerfile.release ├── LICENSE ├── Makefile ├── README.md ├── buf.yaml ├── builder └── files │ ├── dkron.conf │ ├── dkron.service │ └── dkron.yml ├── builtin └── bins │ ├── dkron-executor-gcppubsub │ ├── gcppubsub.go │ ├── gcppubsub_test.go │ └── main.go │ ├── dkron-executor-grpc │ ├── grpc.go │ ├── grpc_test.go │ ├── main.go │ └── test │ │ ├── test.pb.go │ │ ├── test.proto │ │ └── test_grpc.pb.go │ ├── dkron-executor-kafka │ ├── kafka.go │ ├── kafka_test.go │ ├── main.go │ └── scram_client.go │ ├── dkron-executor-nats │ ├── main.go │ ├── nats.go │ └── nats_test.go │ ├── dkron-executor-rabbitmq │ ├── README.md │ ├── main.go │ ├── rabbitmq.go │ └── rabbitmq_test.go │ ├── dkron-processor-files │ ├── files_output.go │ ├── files_output_test.go │ └── main.go │ ├── dkron-processor-fluent │ ├── fluent_output.go │ └── main.go │ ├── dkron-processor-log │ ├── log_output.go │ ├── log_output_test.go │ └── main.go │ └── dkron-processor-syslog │ ├── main.go │ ├── syslog_output.go │ └── syslog_output_test.go ├── client ├── README.md ├── client.go ├── go.mod └── go.sum ├── cmd ├── agent.go ├── agent_test.go ├── dkron.go ├── doc.go ├── http.go ├── keygen.go ├── leave.go ├── plugins.go ├── raft.go ├── shell.go └── version.go ├── dkron ├── agent.go ├── agent_test.go ├── api.go ├── api_test.go ├── config.go ├── config_test.go ├── execution.go ├── fsm.go ├── grpc.go ├── grpc_agent.go ├── grpc_client.go ├── grpc_test.go ├── hclog_adapter.go ├── job.go ├── job_test.go ├── leader.go ├── log.go ├── metrics.go ├── notifier.go ├── notifier_test.go ├── options.go ├── raft_grpc.go ├── retry_join.go ├── run.go ├── scheduler.go ├── scheduler_test.go ├── serf.go ├── server_lookup.go ├── server_lookup_test.go ├── storage.go ├── store.go ├── store_test.go ├── tags.go ├── tags_test.go ├── ui-dist │ ├── assets │ │ ├── dkron-logo-2b1c801f.png │ │ ├── index-606ed8b1.js │ │ └── index-73a69410.css │ ├── dkron-logo.png │ ├── favicon.ico │ ├── index.html │ ├── logo512.png │ ├── manifest.json │ └── robots.txt ├── ui.go ├── utils.go └── version.go ├── docker-compose.dev.yml ├── docker-compose.yml ├── docs └── images │ └── DKRON_STICKER_OK_CMYK_RGB_CONV_300.png ├── extcron ├── extparser.go ├── extparser_test.go ├── simple.go └── simple_test.go ├── go.mod ├── go.sum ├── golangci.yaml ├── logging └── logging.go ├── main.go ├── ntime └── nullabletime.go ├── plugin ├── execution_processor.go ├── executor.go ├── executor_test.go ├── http │ ├── http.go │ ├── http_test.go │ └── testdata │ │ ├── badssl-ca-untrusted-root.crt │ │ ├── badssl.com-client-key-decrypted.pem │ │ └── badssl.com-client.pem ├── plugin.go ├── serve.go └── shell │ ├── prometheus.go │ ├── shell.go │ ├── shell_test.go │ ├── shell_unix.go │ └── shell_windows.go ├── proto ├── dkron.proto ├── executor.proto └── pro.proto ├── scripts ├── .validate ├── ansible │ ├── site.yml │ ├── templates │ │ └── dkron.yml.j2 │ └── test_jobs.yml ├── cluster ├── jobs.sh ├── run ├── setup_test_subnet.sh ├── test ├── testBackupJobs.json └── validate-gofmt ├── types ├── dkron.pb.go ├── dkron_grpc.pb.go ├── execution.go ├── executor.pb.go ├── executor_grpc.pb.go ├── member.go ├── pro.pb.go └── pro_grpc.pb.go ├── ui ├── .env ├── .eslintrc.js ├── .gitignore ├── .yarnrc.yml ├── README.md ├── index.html ├── package.json ├── prettier.config.js ├── public │ ├── dkron-logo.png │ ├── favicon.ico │ ├── logo512.png │ ├── manifest.json │ └── robots.txt ├── src │ ├── App.tsx │ ├── LoginPage.tsx │ ├── TagsField.tsx │ ├── authProvider.ts │ ├── dashboard │ │ ├── CardWithIcon.tsx │ │ ├── Dashboard.tsx │ │ ├── FailedJobs.tsx │ │ ├── JobChart.tsx │ │ ├── Leader.tsx │ │ ├── SuccessfulJobs.tsx │ │ ├── TotalJobs.tsx │ │ ├── UntriggeredJobs.tsx │ │ └── index.ts │ ├── dataProvider.ts │ ├── executions │ │ ├── BusyList.tsx │ │ └── index.ts │ ├── images │ │ └── dkron-logo.png │ ├── index.tsx │ ├── jobs │ │ ├── BulkRunButton.tsx │ │ ├── BulkToggleButton.tsx │ │ ├── EnabledField.tsx │ │ ├── JobEdit.tsx │ │ ├── JobList.tsx │ │ ├── JobShow.tsx │ │ ├── RunButton.tsx │ │ ├── StatusField.tsx │ │ ├── ToggleButton.tsx │ │ ├── ZeroDateField.tsx │ │ └── index.ts │ ├── layout │ │ ├── AppBar.tsx │ │ ├── Clock.tsx │ │ ├── ThemedLayout.tsx │ │ ├── index.css │ │ └── index.ts │ ├── routes.tsx │ ├── settings │ │ ├── Settings.tsx │ │ └── actions.ts │ └── vite-env.d.ts ├── tsconfig.json ├── vite.config.ts └── yarn.lock └── website ├── .yarnrc.yml ├── README.md ├── babel.config.js ├── blog ├── authors.yml ├── dkron-3-0.md ├── dkron-3-2.md ├── dkron-4-0-beta.md ├── dkron-pro-4-0-beta.md └── dkron-pro-4.0-stable.md ├── bun.lockb ├── docs ├── basics │ ├── _category_.json │ ├── configuration.md │ ├── getting-started.md │ └── installation.md ├── cli │ ├── _category_.json │ ├── dkron.md │ ├── dkron_agent.md │ ├── dkron_completion.md │ ├── dkron_completion_bash.md │ ├── dkron_completion_fish.md │ ├── dkron_completion_powershell.md │ ├── dkron_completion_zsh.md │ ├── dkron_doc.md │ ├── dkron_keygen.md │ ├── dkron_leave.md │ ├── dkron_raft.md │ ├── dkron_raft_list-peers.md │ ├── dkron_raft_remove-peer.md │ └── dkron_version.md ├── intro.md ├── pro │ ├── _category_.json │ ├── _index.md │ ├── acls.md │ ├── cli │ │ ├── _category_.json │ │ ├── dkron.md │ │ ├── dkron_acl.md │ │ ├── dkron_acl_bootstrap.md │ │ ├── dkron_acl_policy.md │ │ ├── dkron_acl_policy_apply.md │ │ ├── dkron_acl_policy_delete.md │ │ ├── dkron_acl_policy_info.md │ │ ├── dkron_acl_policy_list.md │ │ ├── dkron_acl_token.md │ │ ├── dkron_acl_token_create.md │ │ ├── dkron_acl_token_info.md │ │ ├── dkron_acl_token_list.md │ │ ├── dkron_agent.md │ │ ├── dkron_completion.md │ │ ├── dkron_completion_bash.md │ │ ├── dkron_completion_fish.md │ │ ├── dkron_completion_powershell.md │ │ ├── dkron_completion_zsh.md │ │ ├── dkron_doc.md │ │ ├── dkron_keygen.md │ │ ├── dkron_leave.md │ │ ├── dkron_raft.md │ │ ├── dkron_raft_list-peers.md │ │ ├── dkron_raft_remove-peer.md │ │ └── dkron_version.md │ ├── commercial-faq.md │ ├── commercial-support.md │ ├── configuration.md │ ├── encryption.md │ ├── executors │ │ ├── _category_.json │ │ ├── docker.md │ │ └── ecs.md │ ├── failover.md │ └── processors │ │ ├── _category_.json │ │ ├── elasticsearch.md │ │ ├── email.md │ │ └── slack.md ├── upgrading │ ├── _category_.json │ ├── from_v1_to_v2.md │ └── from_v2_0_to_v2_2.md └── usage │ ├── _category_.json │ ├── chaining.md │ ├── cloud-auto-join.md │ ├── clustering.md │ ├── concepts.md │ ├── concurrency.md │ ├── cron-spec.md │ ├── cronitor.md │ ├── ecs.md │ ├── executors │ ├── gcp-pubsub.md │ ├── grpc.md │ ├── http.md │ ├── index.md │ ├── kafka.md │ ├── nats.md │ ├── rabbitmq.md │ └── shell.md │ ├── metatags.md │ ├── metrics.md │ ├── plugins │ ├── _category_.json │ ├── develop.md │ └── index.md │ ├── processors │ ├── file.md │ ├── index.md │ ├── log.md │ └── syslog.md │ ├── recovery.md │ ├── retries.md │ ├── storage.md │ ├── target-nodes-spec.md │ └── upgrade.md ├── docusaurus.config.js ├── package.json ├── postcss.config.js ├── sidebars.js ├── src ├── components │ ├── HomepageBanner.js │ ├── HomepageDescPanel.js │ ├── HomepageFeatures.js │ ├── HomepageHeader.js │ ├── HomepagePricing.js │ ├── HomepageStats.js │ ├── HomepageTestimonials.js │ ├── HomepageUseCases.js │ └── HomepageUsers.js ├── css │ └── custom.css └── pages │ ├── dkron_vs_other_software.md │ ├── index.js │ ├── index.module.css │ ├── license.md │ └── pro.js ├── static ├── .nojekyll ├── CNAME ├── img │ ├── AXP_BlueBoxLogo_EXTRALARGEscale_RGB_DIGITAL_1600x1600.png │ ├── Allianz.png │ ├── Allianz.svg │ ├── Blackstone_publishing_Logo_v2.png │ ├── Flickr_logo.png │ ├── SoCal_Gas.png │ ├── available.png │ ├── benemen-logo.png │ ├── book-keeping.png │ ├── cronitor1.jpg │ ├── cronitor2.jpg │ ├── data-consolidation.png │ ├── data-transfer.png │ ├── dkron-black.png │ ├── dkron-gradient.png │ ├── dkron-gray.png │ ├── dkron-logo-black.png │ ├── dkron-logo.png │ ├── docusaurus.png │ ├── email-delivery.png │ ├── favicon.ico │ ├── flywire-logo.svg │ ├── integration.png │ ├── job-list-new.png │ ├── job-list.png │ ├── jt-logo.png │ ├── kata_ai.png │ ├── logo-delcampe.svg │ ├── logo-enreach.svg │ ├── logo_linkfluence.png │ ├── mallgroup-logo.svg │ ├── payroll-generation.png │ ├── recurring-invoicing.png │ ├── rubicon-logo.svg │ ├── screenshot1.png │ ├── sign-in.jpg │ ├── slack.png │ ├── targets.png │ ├── undraw_docusaurus_mountain.svg │ ├── undraw_docusaurus_react.svg │ ├── undraw_docusaurus_tree.svg │ ├── voiceworks-logo.png │ ├── voiceworks-logo.svg │ └── weta_logo.png ├── js │ └── linkedin.js └── openapi │ └── openapi.yaml ├── tailwind.config.js ├── versioned_docs ├── version-v1 │ ├── _footer.md │ ├── api │ │ └── _index.md │ ├── basics │ │ ├── _index.md │ │ ├── configuration.md │ │ ├── getting-started.md │ │ └── installation.md │ ├── cli │ │ ├── _index.md │ │ ├── dkron.md │ │ ├── dkron_agent.md │ │ ├── dkron_doc.md │ │ ├── dkron_keygen.md │ │ ├── dkron_leave.md │ │ └── dkron_version.md │ ├── intro │ │ ├── _index.md │ │ ├── dkron_vs_other_software.md │ │ └── license.md │ ├── pro │ │ ├── _index.md │ │ ├── auth.md │ │ ├── cli │ │ │ ├── _index.md │ │ │ ├── dkron.md │ │ │ ├── dkron_agent.md │ │ │ ├── dkron_doc.md │ │ │ ├── dkron_keygen.md │ │ │ └── dkron_version.md │ │ ├── clustering.md │ │ ├── commercial-faq.md │ │ ├── commercial-support.md │ │ ├── configuration.md │ │ ├── encryption.md │ │ ├── executors │ │ │ ├── _index.md │ │ │ ├── docker.md │ │ │ └── ecs.md │ │ ├── processors │ │ │ ├── _index.md │ │ │ ├── elasticsearch.md │ │ │ ├── email.md │ │ │ └── slack.md │ │ ├── quick-start.md │ │ └── storage.md │ ├── swagger.yaml │ └── usage │ │ ├── _index.md │ │ ├── chaining.md │ │ ├── clustering.md │ │ ├── concurrency.md │ │ ├── cron-spec.md │ │ ├── ecs.md │ │ ├── executors │ │ ├── _index.md │ │ ├── http.md │ │ └── shell.md │ │ ├── internals.md │ │ ├── metrics.md │ │ ├── plugins │ │ ├── _index.md │ │ └── develop.md │ │ ├── processors │ │ ├── _index.md │ │ ├── file.md │ │ ├── log.md │ │ └── syslog.md │ │ ├── retries.md │ │ └── target-nodes-spec.md ├── version-v2 │ ├── _footer.md │ ├── api │ │ └── _index.md │ ├── basics │ │ ├── _index.md │ │ ├── configuration.md │ │ ├── getting-started.md │ │ └── installation.md │ ├── cli │ │ ├── _index.md │ │ ├── dkron.md │ │ ├── dkron_agent.md │ │ ├── dkron_doc.md │ │ ├── dkron_keygen.md │ │ ├── dkron_leave.md │ │ ├── dkron_raft.md │ │ ├── dkron_raft_list-peers.md │ │ ├── dkron_raft_remove-peer.md │ │ └── dkron_version.md │ ├── intro │ │ ├── _index.md │ │ ├── dkron_vs_other_software.md │ │ └── license.md │ ├── pro │ │ ├── _index.md │ │ ├── acls.md │ │ ├── auth.md │ │ ├── cli │ │ │ ├── _index.md │ │ │ ├── dkron.md │ │ │ ├── dkron_agent.md │ │ │ ├── dkron_doc.md │ │ │ ├── dkron_keygen.md │ │ │ ├── dkron_leave.md │ │ │ ├── dkron_raft.md │ │ │ ├── dkron_raft_list-peers.md │ │ │ ├── dkron_raft_remove-peer.md │ │ │ └── dkron_version.md │ │ ├── commercial-faq.md │ │ ├── commercial-support.md │ │ ├── configuration.md │ │ ├── encryption.md │ │ ├── executors │ │ │ ├── _index.md │ │ │ ├── docker.md │ │ │ └── ecs.md │ │ ├── failover.md │ │ └── processors │ │ │ ├── _index.md │ │ │ ├── elasticsearch.md │ │ │ ├── email.md │ │ │ └── slack.md │ ├── products │ │ ├── _index.md │ │ └── pro.html │ ├── swagger.yaml │ ├── upgrading │ │ └── from_v1_to_v2.md │ └── usage │ │ ├── _index.md │ │ ├── chaining.md │ │ ├── cloud-auto-join.md │ │ ├── clustering.md │ │ ├── concurrency.md │ │ ├── cron-spec.md │ │ ├── ecs.md │ │ ├── executors │ │ ├── _index.md │ │ ├── http.md │ │ └── shell.md │ │ ├── metatags.md │ │ ├── metrics.md │ │ ├── plugins │ │ ├── _index.md │ │ └── develop.md │ │ ├── processors │ │ ├── _index.md │ │ ├── file.md │ │ ├── log.md │ │ └── syslog.md │ │ ├── recovery.md │ │ ├── retries.md │ │ ├── storage.md │ │ └── target-nodes-spec.md └── version-v3 │ ├── basics │ ├── _category_.json │ ├── configuration.md │ ├── getting-started.md │ └── installation.md │ ├── cli │ ├── _category_.json │ ├── dkron.md │ ├── dkron_agent.md │ ├── dkron_completion.md │ ├── dkron_completion_bash.md │ ├── dkron_completion_fish.md │ ├── dkron_completion_powershell.md │ ├── dkron_completion_zsh.md │ ├── dkron_doc.md │ ├── dkron_keygen.md │ ├── dkron_leave.md │ ├── dkron_raft.md │ ├── dkron_raft_list-peers.md │ ├── dkron_raft_remove-peer.md │ └── dkron_version.md │ ├── intro.md │ ├── pro │ ├── _category_.json │ ├── _index.md │ ├── acls.md │ ├── auth.md │ ├── cli │ │ ├── _category_.json │ │ ├── dkron.md │ │ ├── dkron_agent.md │ │ ├── dkron_completion.md │ │ ├── dkron_completion_bash.md │ │ ├── dkron_completion_fish.md │ │ ├── dkron_completion_powershell.md │ │ ├── dkron_completion_zsh.md │ │ ├── dkron_doc.md │ │ ├── dkron_keygen.md │ │ ├── dkron_leave.md │ │ ├── dkron_raft.md │ │ ├── dkron_raft_list-peers.md │ │ ├── dkron_raft_remove-peer.md │ │ └── dkron_version.md │ ├── commercial-faq.md │ ├── commercial-support.md │ ├── configuration.md │ ├── encryption.md │ ├── executors │ │ ├── _category_.json │ │ ├── docker.md │ │ └── ecs.md │ ├── failover.md │ └── processors │ │ ├── _category_.json │ │ ├── elasticsearch.md │ │ ├── email.md │ │ └── slack.md │ ├── upgrading │ ├── _category_.json │ ├── from_v1_to_v2.md │ └── from_v2_0_to_v2_2.md │ └── usage │ ├── _category_.json │ ├── chaining.md │ ├── cloud-auto-join.md │ ├── clustering.md │ ├── concurrency.md │ ├── cron-spec.md │ ├── cronitor.md │ ├── ecs.md │ ├── executors │ ├── grpc.md │ ├── http.md │ ├── index.md │ ├── kafka.md │ ├── nats.md │ └── shell.md │ ├── metatags.md │ ├── metrics.md │ ├── plugins │ ├── _category_.json │ ├── develop.md │ └── index.md │ ├── processors │ ├── file.md │ ├── index.md │ ├── log.md │ └── syslog.md │ ├── recovery.md │ ├── retries.md │ ├── storage.md │ ├── target-nodes-spec.md │ └── upgrade.md ├── versioned_sidebars ├── version-v1-sidebars.json ├── version-v2-sidebars.json └── version-v3-sidebars.json ├── versions.json └── yarn.lock /.dockerignore: -------------------------------------------------------------------------------- 1 | docs 2 | static 3 | site 4 | public 5 | vendor 6 | docker-compose 7 | dkron_theme 8 | build/ 9 | website 10 | dkron-* 11 | main 12 | *.data 13 | node_modules 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Specifications:** 27 | - OS: [e.g. linux] 28 | - Version: [e.g. 2.0.1] 29 | - Executor: [e.g. shell] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Keep Go modules updated 4 | - package-ecosystem: "gomod" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | open-pull-requests-limit: 10 9 | 10 | # Disable updates for Javascript/npm in the /ui directory 11 | - package-ecosystem: "npm" 12 | directory: "/ui" 13 | schedule: 14 | interval: "daily" 15 | open-pull-requests-limit: 0 # This disables PR creation 16 | 17 | # Disable updates for Javascript/npm in the /website directory 18 | - package-ecosystem: "npm" 19 | directory: "/website" 20 | schedule: 21 | interval: "daily" 22 | open-pull-requests-limit: 0 # This disables PR creation 23 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Proposed changes 2 | 3 | Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. 4 | If it fixes a bug or resolves a feature request, be sure to link to that issue. 5 | 6 | ## Types of changes 7 | 8 | What types of changes does your code introduce? 9 | _Put an `x` in the boxes that apply_ 10 | 11 | - [ ] Bugfix (non-breaking change which fixes an issue) 12 | - [ ] New feature (non-breaking change which adds functionality) 13 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) 14 | - [ ] Documentation Update (if none of the other choices apply) 15 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | on: 3 | push: 4 | branches: 5 | - '**' 6 | tags-ignore: 7 | - '**' 8 | 9 | pull_request: 10 | paths-ignore: 11 | - '**.md' 12 | - 'website/**' 13 | - 'docs/**' 14 | - 'examples/**' 15 | - 'ui' 16 | 17 | jobs: 18 | test: 19 | name: Test 20 | runs-on: ubuntu-latest 21 | steps: 22 | 23 | - name: Set up Go 24 | uses: actions/setup-go@v5 25 | with: 26 | go-version: 1.23.1 27 | id: go 28 | 29 | - name: Check out code into the Go module directory 30 | uses: actions/checkout@v4 31 | 32 | - name: Get dependencies 33 | run: go get -v -t -d ./... 34 | 35 | - name: Test without docker 36 | run: go test -v -timeout 200s ./... 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | site/ 2 | /public 3 | /website/public 4 | docs/scss/Gemfile.lock 5 | docs/scss/.sass-cache 6 | downloads/ 7 | .goxc.local.json 8 | .envrc 9 | .vagrant 10 | vendor/ 11 | main 12 | /dkron-processor-* 13 | /dkron-executor-* 14 | *.log 15 | config/ 16 | dist 17 | node_modules 18 | *.db 19 | *.data 20 | *.retry 21 | .DS_Store 22 | .vscode 23 | tags 24 | .sass-cache 25 | .idea/ 26 | hosts.yaml 27 | 28 | # Production 29 | build 30 | 31 | # Generated files 32 | .docusaurus 33 | .cache-loader 34 | .yarn 35 | 36 | # Misc 37 | .env.local 38 | .env.development.local 39 | .env.test.local 40 | .env.production.local 41 | 42 | npm-debug.log* 43 | yarn-debug.log* 44 | yarn-error.log* 45 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | 2 | [submodule "website/themes/docdock"] 3 | path = website/themes/docdock 4 | url = https://github.com/vjeantet/hugo-theme-docdock.git 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.23.1 2 | LABEL maintainer="Victor Castell <0x@vcastellm.xyz>" 3 | 4 | EXPOSE 8080 8946 5 | 6 | RUN mkdir -p /app 7 | WORKDIR /app 8 | 9 | ENV GOCACHE=/root/.cache/go-build 10 | ENV GOMODCACHE=/root/.cache/go-build 11 | ENV GO111MODULE=on 12 | 13 | # Leverage build cache by copying go.mod and go.sum first 14 | COPY go.mod go.sum ./ 15 | RUN --mount=type=cache,target=/root/.cache/go-build go mod download 16 | RUN go mod verify 17 | 18 | RUN go mod download 19 | 20 | # Copy the rest of the source code 21 | COPY . . 22 | 23 | RUN go install ./... 24 | 25 | CMD ["dkron"] 26 | -------------------------------------------------------------------------------- /Dockerfile.light.hub: -------------------------------------------------------------------------------- 1 | FROM alpine:3.20 2 | LABEL maintainer="Victor Castell <0x@vcastellm.xyz>" 3 | 4 | RUN set -x \ 5 | && buildDeps='bash ca-certificates openssl tzdata' \ 6 | && apk add --no-cache --update $buildDeps 7 | 8 | EXPOSE 8080 8946 9 | 10 | ENV SHELL /bin/bash 11 | COPY dkron /usr/local/bin/ 12 | 13 | ENTRYPOINT ["/usr/local/bin/dkron"] 14 | 15 | CMD ["--help"] 16 | -------------------------------------------------------------------------------- /Dockerfile.release: -------------------------------------------------------------------------------- 1 | FROM alpine:3.20 2 | LABEL maintainer="Victor Castell <0x@vcastellm.xyz>" 3 | 4 | RUN set -x \ 5 | && buildDeps='bash ca-certificates openssl tzdata' \ 6 | && apk add --no-cache --update $buildDeps 7 | 8 | EXPOSE 8080 8946 9 | 10 | ENV SHELL /bin/bash 11 | COPY * /usr/local/bin/ 12 | 13 | ENTRYPOINT ["/usr/local/bin/dkron"] 14 | 15 | CMD ["--help"] 16 | -------------------------------------------------------------------------------- /buf.yaml: -------------------------------------------------------------------------------- 1 | version: v2 2 | modules: 3 | - path: proto 4 | name: buf.build/distribworks/dkron 5 | -------------------------------------------------------------------------------- /builder/files/dkron.conf: -------------------------------------------------------------------------------- 1 | # Dkron Agent (Upstart unit) 2 | description "Dkron Agent" 3 | start on (local-filesystems and net-device-up IFACE!=lo) 4 | stop on runlevel [06] 5 | 6 | env DKRON=/usr/bin/dkron 7 | 8 | exec $DKRON agent >> /var/log/dkron.log 2>&1 9 | 10 | respawn 11 | respawn limit 10 10 12 | kill timeout 10 13 | -------------------------------------------------------------------------------- /builder/files/dkron.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Dkron Agent 3 | Documentation=https://dkron.io 4 | After=network.target 5 | 6 | [Service] 7 | User=root 8 | ExecStart=/usr/bin/dkron agent 9 | ExecReload=/bin/kill -HUP $MAINPID 10 | Restart=on-failure 11 | KillSignal=SIGTERM 12 | 13 | [Install] 14 | WantedBy=multi-user.target 15 | -------------------------------------------------------------------------------- /builtin/bins/dkron-executor-gcppubsub/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | dkplugin "github.com/distribworks/dkron/v4/plugin" 5 | "github.com/hashicorp/go-plugin" 6 | ) 7 | 8 | func main() { 9 | plugin.Serve(&plugin.ServeConfig{ 10 | HandshakeConfig: dkplugin.Handshake, 11 | Plugins: map[string]plugin.Plugin{ 12 | "executor": &dkplugin.ExecutorPlugin{Executor: &GCPPubSub{}}, 13 | }, 14 | 15 | // A non-nil value here enables gRPC serving for this plugin... 16 | GRPCServer: plugin.DefaultGRPCServer, 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /builtin/bins/dkron-executor-grpc/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | dkplugin "github.com/distribworks/dkron/v4/plugin" 5 | "github.com/hashicorp/go-plugin" 6 | ) 7 | 8 | func main() { 9 | plugin.Serve(&plugin.ServeConfig{ 10 | HandshakeConfig: dkplugin.Handshake, 11 | Plugins: map[string]plugin.Plugin{ 12 | "executor": &dkplugin.ExecutorPlugin{Executor: &GRPC{}}, 13 | }, 14 | 15 | // A non-nil value here enables gRPC serving for this plugin... 16 | GRPCServer: plugin.DefaultGRPCServer, 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /builtin/bins/dkron-executor-grpc/test/test.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package test; 3 | option go_package = "github.com/distribworks/dkron/builtin/bins/dkron-executor-grpc/test"; 4 | 5 | message TestRequest { 6 | string body = 1; 7 | } 8 | 9 | service TestService { 10 | rpc Test(TestRequest) returns (TestRequest) {} 11 | } 12 | -------------------------------------------------------------------------------- /builtin/bins/dkron-executor-kafka/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | dkplugin "github.com/distribworks/dkron/v4/plugin" 5 | "github.com/hashicorp/go-plugin" 6 | ) 7 | 8 | func main() { 9 | plugin.Serve(&plugin.ServeConfig{ 10 | HandshakeConfig: dkplugin.Handshake, 11 | Plugins: map[string]plugin.Plugin{ 12 | "executor": &dkplugin.ExecutorPlugin{Executor: &Kafka{}}, 13 | }, 14 | 15 | // A non-nil value here enables gRPC serving for this plugin... 16 | GRPCServer: plugin.DefaultGRPCServer, 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /builtin/bins/dkron-executor-kafka/scram_client.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "crypto/sha256" 5 | "crypto/sha512" 6 | 7 | "github.com/xdg-go/scram" 8 | ) 9 | 10 | var ( 11 | SHA256 scram.HashGeneratorFcn = sha256.New 12 | SHA512 scram.HashGeneratorFcn = sha512.New 13 | ) 14 | 15 | type XDGSCRAMClient struct { 16 | *scram.Client 17 | *scram.ClientConversation 18 | scram.HashGeneratorFcn 19 | } 20 | 21 | func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error) { 22 | x.Client, err = x.HashGeneratorFcn.NewClient(userName, password, authzID) 23 | if err != nil { 24 | return err 25 | } 26 | x.ClientConversation = x.Client.NewConversation() 27 | return nil 28 | } 29 | 30 | func (x *XDGSCRAMClient) Step(challenge string) (response string, err error) { 31 | response, err = x.ClientConversation.Step(challenge) 32 | return 33 | } 34 | 35 | func (x *XDGSCRAMClient) Done() bool { 36 | return x.ClientConversation.Done() 37 | } 38 | -------------------------------------------------------------------------------- /builtin/bins/dkron-executor-nats/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | dkplugin "github.com/distribworks/dkron/v4/plugin" 5 | "github.com/hashicorp/go-plugin" 6 | ) 7 | 8 | func main() { 9 | plugin.Serve(&plugin.ServeConfig{ 10 | HandshakeConfig: dkplugin.Handshake, 11 | Plugins: map[string]plugin.Plugin{ 12 | "executor": &dkplugin.ExecutorPlugin{Executor: &Nats{}}, 13 | }, 14 | 15 | // A non-nil value here enables gRPC serving for this plugin... 16 | GRPCServer: plugin.DefaultGRPCServer, 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /builtin/bins/dkron-executor-nats/nats_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | dktypes "github.com/distribworks/dkron/v4/types" 8 | ) 9 | 10 | func TestPublishExecute(t *testing.T) { 11 | pa := &dktypes.ExecuteRequest{ 12 | JobName: "testJob", 13 | Config: map[string]string{ 14 | "subject": "opcuaReadRequest", 15 | "url": "localhost:4222", 16 | "message": "{\"hello\":11}", 17 | "debug": "true", 18 | }, 19 | } 20 | nats := &Nats{} 21 | output, err := nats.Execute(pa, nil) 22 | fmt.Println(string(output.Output)) 23 | fmt.Println(err) 24 | if err != nil { 25 | t.Fatal(err) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /builtin/bins/dkron-executor-rabbitmq/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | dkplugin "github.com/distribworks/dkron/v4/plugin" 5 | "github.com/hashicorp/go-plugin" 6 | ) 7 | 8 | func main() { 9 | plugin.Serve(&plugin.ServeConfig{ 10 | HandshakeConfig: dkplugin.Handshake, 11 | Plugins: map[string]plugin.Plugin{ 12 | "executor": &dkplugin.ExecutorPlugin{Executor: &RabbitMQ{}}, 13 | }, 14 | 15 | // A non-nil value here enables gRPC serving for this plugin... 16 | GRPCServer: plugin.DefaultGRPCServer, 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /builtin/bins/dkron-processor-files/files_output_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/distribworks/dkron/v4/plugin" 8 | "github.com/distribworks/dkron/v4/types" 9 | "github.com/stretchr/testify/assert" 10 | "google.golang.org/protobuf/types/known/timestamppb" 11 | ) 12 | 13 | func TestProcess(t *testing.T) { 14 | now := timestamppb.Now() 15 | 16 | pa := &plugin.ProcessorArgs{ 17 | Execution: types.Execution{ 18 | StartedAt: now, 19 | NodeName: "testNode", 20 | Output: []byte("test"), 21 | }, 22 | Config: plugin.Config{ 23 | "forward": "false", 24 | "log_dir": "/tmp", 25 | }, 26 | } 27 | 28 | fo := &FilesOutput{} 29 | ex := fo.Process(pa) 30 | 31 | assert.Equal(t, fmt.Sprintf("/tmp/%s.log", ex.Key()), string(ex.Output)) 32 | } 33 | -------------------------------------------------------------------------------- /builtin/bins/dkron-processor-files/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/distribworks/dkron/v4/plugin" 5 | ) 6 | 7 | func main() { 8 | plugin.Serve(&plugin.ServeOpts{ 9 | Processor: new(FilesOutput), 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /builtin/bins/dkron-processor-log/log_output_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/distribworks/dkron/v4/plugin" 7 | "github.com/distribworks/dkron/v4/types" 8 | "github.com/stretchr/testify/assert" 9 | "google.golang.org/protobuf/types/known/timestamppb" 10 | ) 11 | 12 | func TestProcess(t *testing.T) { 13 | now := timestamppb.Now() 14 | 15 | pa := &plugin.ProcessorArgs{ 16 | Execution: types.Execution{ 17 | StartedAt: now, 18 | NodeName: "testNode", 19 | Output: []byte("test"), 20 | }, 21 | Config: plugin.Config{ 22 | "forward": "false", 23 | }, 24 | } 25 | 26 | fo := &LogOutput{} 27 | ex := fo.Process(pa) 28 | 29 | assert.Equal(t, "Output in dkron log", string(ex.Output)) 30 | } 31 | -------------------------------------------------------------------------------- /builtin/bins/dkron-processor-log/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/distribworks/dkron/v4/plugin" 5 | ) 6 | 7 | func main() { 8 | plugin.Serve(&plugin.ServeOpts{ 9 | Processor: new(LogOutput), 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /builtin/bins/dkron-processor-syslog/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/distribworks/dkron/v4/plugin" 5 | ) 6 | 7 | func main() { 8 | plugin.Serve(&plugin.ServeOpts{ 9 | Processor: new(SyslogOutput), 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /builtin/bins/dkron-processor-syslog/syslog_output_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/distribworks/dkron/v4/plugin" 7 | "github.com/distribworks/dkron/v4/types" 8 | "github.com/stretchr/testify/assert" 9 | "google.golang.org/protobuf/types/known/timestamppb" 10 | ) 11 | 12 | func TestProcess(t *testing.T) { 13 | now := timestamppb.Now() 14 | 15 | pa := &plugin.ProcessorArgs{ 16 | Execution: types.Execution{ 17 | StartedAt: now, 18 | NodeName: "testNode", 19 | Output: []byte("test"), 20 | }, 21 | Config: plugin.Config{ 22 | "forward": "true", 23 | }, 24 | } 25 | 26 | fo := &SyslogOutput{} 27 | ex := fo.Process(pa) 28 | 29 | assert.Equal(t, "test", string(ex.Output)) 30 | } 31 | -------------------------------------------------------------------------------- /cmd/http.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | dkplugin "github.com/distribworks/dkron/v4/plugin" 5 | "github.com/distribworks/dkron/v4/plugin/http" 6 | "github.com/hashicorp/go-plugin" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | var httpCmd = &cobra.Command{ 11 | Hidden: true, 12 | Use: "http", 13 | Short: "Run the http plugin", 14 | Long: ``, 15 | Run: func(cmd *cobra.Command, args []string) { 16 | plugin.Serve(&plugin.ServeConfig{ 17 | HandshakeConfig: dkplugin.Handshake, 18 | Plugins: map[string]plugin.Plugin{ 19 | "executor": &dkplugin.ExecutorPlugin{Executor: http.New()}, 20 | }, 21 | 22 | // A non-nil value here enables gRPC serving for this plugin... 23 | GRPCServer: plugin.DefaultGRPCServer, 24 | }) 25 | }, 26 | } 27 | 28 | func init() { 29 | dkronCmd.AddCommand(httpCmd) 30 | } 31 | -------------------------------------------------------------------------------- /cmd/keygen.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "crypto/rand" 5 | "encoding/base64" 6 | "errors" 7 | "fmt" 8 | 9 | log "github.com/sirupsen/logrus" 10 | "github.com/spf13/cobra" 11 | ) 12 | 13 | // versionCmd represents the version command 14 | var keygenCmd = &cobra.Command{ 15 | Use: "keygen", 16 | Short: "Generates a new encryption key", 17 | Long: `Generates a new encryption key that can be used to configure the 18 | agent to encrypt traffic. The output of this command is already 19 | in the proper format that the agent expects.`, 20 | RunE: func(cmd *cobra.Command, args []string) error { 21 | key := make([]byte, 16) 22 | n, err := rand.Reader.Read(key) 23 | if err != nil { 24 | return fmt.Errorf("error reading random data: %s", err) 25 | } 26 | if n != 16 { 27 | return errors.New("couldn't read enough entropy. Generate more entropy") 28 | } 29 | 30 | log.Info(base64.StdEncoding.EncodeToString(key)) 31 | return nil 32 | }, 33 | } 34 | 35 | func init() { 36 | dkronCmd.AddCommand(keygenCmd) 37 | } 38 | -------------------------------------------------------------------------------- /cmd/shell.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | dkplugin "github.com/distribworks/dkron/v4/plugin" 5 | "github.com/distribworks/dkron/v4/plugin/shell" 6 | "github.com/hashicorp/go-plugin" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | var shellCmd = &cobra.Command{ 11 | Hidden: true, 12 | Use: "shell", 13 | Short: "Shell plugin for dkron", 14 | Long: ``, 15 | Run: func(cmd *cobra.Command, args []string) { 16 | plugin.Serve(&plugin.ServeConfig{ 17 | HandshakeConfig: dkplugin.Handshake, 18 | Plugins: map[string]plugin.Plugin{ 19 | "executor": &dkplugin.ExecutorPlugin{Executor: &shell.Shell{}}, 20 | }, 21 | 22 | // A non-nil value here enables gRPC serving for this plugin... 23 | GRPCServer: plugin.DefaultGRPCServer, 24 | }) 25 | }, 26 | } 27 | 28 | func init() { 29 | dkronCmd.AddCommand(shellCmd) 30 | } 31 | -------------------------------------------------------------------------------- /cmd/version.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/distribworks/dkron/v4/dkron" 7 | "github.com/hashicorp/serf/serf" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | // versionCmd represents the version command 12 | var versionCmd = &cobra.Command{ 13 | Use: "version", 14 | Short: "Show version", 15 | Long: `Show the version`, 16 | Run: func(cmd *cobra.Command, args []string) { 17 | fmt.Printf("Name: %s\n", dkron.Name) 18 | fmt.Printf("Version: %s\n", dkron.Version) 19 | fmt.Printf("Codename: %s\n", dkron.Codename) 20 | fmt.Printf("Agent Protocol: %d (Understands back to: %d)\n", 21 | serf.ProtocolVersionMax, serf.ProtocolVersionMin) 22 | }, 23 | } 24 | 25 | func init() { 26 | dkronCmd.AddCommand(versionCmd) 27 | } 28 | -------------------------------------------------------------------------------- /dkron/log.go: -------------------------------------------------------------------------------- 1 | package dkron 2 | 3 | import ( 4 | "io/ioutil" 5 | "sync" 6 | 7 | "github.com/gin-gonic/gin" 8 | "github.com/sirupsen/logrus" 9 | ) 10 | 11 | // ginOnce is a wrapper around gin global var changes. This is a workaround 12 | // against the lack of concurrency safety of these vars in the gin package. 13 | var ginOnce sync.Once 14 | 15 | // InitLogger creates the logger instance 16 | func InitLogger(logLevel string, node string) *logrus.Entry { 17 | formattedLogger := logrus.New() 18 | formattedLogger.Formatter = &logrus.TextFormatter{FullTimestamp: true} 19 | 20 | level, err := logrus.ParseLevel(logLevel) 21 | if err != nil { 22 | logrus.WithError(err).Error("Error parsing log level, using: info") 23 | level = logrus.InfoLevel 24 | } 25 | 26 | formattedLogger.Level = level 27 | log := logrus.NewEntry(formattedLogger).WithField("node", node) 28 | 29 | ginOnce.Do(func() { 30 | if level == logrus.DebugLevel { 31 | gin.DefaultWriter = log.Writer() 32 | gin.SetMode(gin.DebugMode) 33 | } else { 34 | gin.DefaultWriter = ioutil.Discard 35 | gin.SetMode(gin.ReleaseMode) 36 | } 37 | }) 38 | 39 | return log 40 | } 41 | -------------------------------------------------------------------------------- /dkron/options.go: -------------------------------------------------------------------------------- 1 | package dkron 2 | 3 | import ( 4 | "crypto/tls" 5 | ) 6 | 7 | // WithPlugins option to set plugins to the agent 8 | func WithPlugins(plugins Plugins) AgentOption { 9 | return func(agent *Agent) { 10 | agent.ProcessorPlugins = plugins.Processors 11 | agent.ExecutorPlugins = plugins.Executors 12 | } 13 | } 14 | 15 | // WithTransportCredentials set tls config in the agent 16 | func WithTransportCredentials(tls *tls.Config) AgentOption { 17 | return func(agent *Agent) { 18 | agent.TLSConfig = tls 19 | } 20 | } 21 | 22 | // WithStore set store in the agent 23 | func WithStore(store Storage) AgentOption { 24 | return func(agent *Agent) { 25 | agent.Store = store 26 | } 27 | } 28 | 29 | func WithRaftStore(raftStore RaftStore) AgentOption { 30 | return func(agent *Agent) { 31 | agent.raftStore = raftStore 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /dkron/storage.go: -------------------------------------------------------------------------------- 1 | package dkron 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | // Storage is the interface that should be used by any 8 | // storage engine implemented for dkron. It contains the 9 | // minimum set of operations that are needed to have a working 10 | // dkron store. 11 | type Storage interface { 12 | SetJob(job *Job, copyDependentJobs bool) error 13 | DeleteJob(name string) (*Job, error) 14 | SetExecution(execution *Execution) (string, error) 15 | SetExecutionDone(execution *Execution) (bool, error) 16 | GetJobs(options *JobOptions) ([]*Job, error) 17 | GetJob(name string, options *JobOptions) (*Job, error) 18 | GetExecutions(jobName string, opts *ExecutionOptions) ([]*Execution, error) 19 | GetExecutionGroup(execution *Execution, opts *ExecutionOptions) ([]*Execution, error) 20 | GetGroupedExecutions(jobName string, opts *ExecutionOptions) (map[int64][]*Execution, []int64, error) 21 | Shutdown() error 22 | Snapshot(w io.WriteCloser) error 23 | Restore(r io.ReadCloser) error 24 | } 25 | -------------------------------------------------------------------------------- /dkron/ui-dist/assets/dkron-logo-2b1c801f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/dkron/ui-dist/assets/dkron-logo-2b1c801f.png -------------------------------------------------------------------------------- /dkron/ui-dist/assets/index-73a69410.css: -------------------------------------------------------------------------------- 1 | body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.execution-output{white-space:break-spaces;font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace;max-height:300px;overflow:auto}.clock{width:100px} 2 | -------------------------------------------------------------------------------- /dkron/ui-dist/dkron-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/dkron/ui-dist/dkron-logo.png -------------------------------------------------------------------------------- /dkron/ui-dist/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/dkron/ui-dist/favicon.ico -------------------------------------------------------------------------------- /dkron/ui-dist/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/dkron/ui-dist/logo512.png -------------------------------------------------------------------------------- /dkron/ui-dist/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "ui", 3 | "name": "{{name}}", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /dkron/ui-dist/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: -------------------------------------------------------------------------------- /dkron/version.go: -------------------------------------------------------------------------------- 1 | package dkron 2 | 3 | // Name store the name of this software 4 | var Name = "Dkron" 5 | 6 | // Version is the current version that will get replaced 7 | // on build. 8 | var Version = "devel" 9 | 10 | // Codename codename of this series 11 | var Codename = "Devel" 12 | -------------------------------------------------------------------------------- /docker-compose.dev.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: '2' 3 | services: 4 | 5 | dkron: 6 | build: . 7 | command: dkron agent --server --log-level=debug --bootstrap-expect=1 8 | ports: 9 | - "8080:8080" 10 | - "8946" 11 | - "6868" 12 | environment: 13 | - GODEBUG=netdns=go 14 | 15 | dkron-server: 16 | build: . 17 | command: dkron agent --server --retry-join=dkron:8946 --log-level=debug --bootstrap-expect=3 18 | ports: 19 | - "8080" 20 | - "8946" 21 | - "6868" 22 | environment: 23 | - GODEBUG=netdns=go 24 | 25 | dkron-agent: 26 | command: dkron agent --retry-join=dkron:8946 --log-level=debug --tag agent=true 27 | build: . 28 | ports: 29 | - "8946" 30 | - "6868" 31 | environment: 32 | - GODEBUG=netdns=go -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | # Run a leader node 3 | dkron: 4 | image: dkron/dkron:latest 5 | command: agent --server --log-level=debug --bootstrap-expect=1 6 | ports: 7 | - "8080:8080" 8 | - "8946" 9 | - "6868" 10 | environment: 11 | - GODEBUG=netdns=go 12 | 13 | dkron-server: 14 | image: dkron/dkron:latest 15 | command: agent --server --retry-join=dkron:8946 --log-level=debug --bootstrap-expect=3 16 | ports: 17 | - "8080" 18 | - "8946" 19 | - "6868" 20 | environment: 21 | - GODEBUG=netdns=go 22 | 23 | # Run an agent node 24 | dkron-agent: 25 | image: dkron/dkron:latest 26 | command: agent --retry-join=dkron:8946 --log-level=debug --tag agent=true 27 | ports: 28 | - "8946" 29 | - "6868" 30 | environment: 31 | - GODEBUG=netdns=go 32 | -------------------------------------------------------------------------------- /docs/images/DKRON_STICKER_OK_CMYK_RGB_CONV_300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/docs/images/DKRON_STICKER_OK_CMYK_RGB_CONV_300.png -------------------------------------------------------------------------------- /extcron/simple.go: -------------------------------------------------------------------------------- 1 | package extcron 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | // SimpleSchedule represents a simple non recurring duration. 8 | type SimpleSchedule struct { 9 | Date time.Time 10 | } 11 | 12 | // At just stores the given time for this schedule. 13 | func At(date time.Time) SimpleSchedule { 14 | return SimpleSchedule{ 15 | Date: date, 16 | } 17 | } 18 | 19 | // Next conforms to the Schedule interface but this kind of jobs 20 | // doesn't need to be run more than once, so it doesn't return a new date but the existing one. 21 | func (schedule SimpleSchedule) Next(t time.Time) time.Time { 22 | // If the date set is after the reference time return it. 23 | // If it's before, return a time in the past (01-01-0001) 24 | // so it never runs. 25 | if schedule.Date.After(t) { 26 | return schedule.Date 27 | } 28 | return time.Time{} 29 | } 30 | -------------------------------------------------------------------------------- /extcron/simple_test.go: -------------------------------------------------------------------------------- 1 | package extcron 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | ) 7 | 8 | func TestSimpleNext(t *testing.T) { 9 | tests := []struct { 10 | time string 11 | date string 12 | expected string 13 | }{ 14 | // Simple cases 15 | {"2012-07-09T14:45:00Z", "2012-07-09T15:00:00Z", "2012-07-09T15:00:00Z"}, 16 | {"2012-07-09T14:45:00Z", "2012-07-05T13:00:00Z", "0001-01-01T00:00:00Z"}, 17 | } 18 | 19 | for _, c := range tests { 20 | now, _ := time.Parse(time.RFC3339, c.time) 21 | date, _ := time.Parse(time.RFC3339, c.date) 22 | actual := At(date).Next(now) 23 | expected, _ := time.Parse(time.RFC3339, c.expected) 24 | 25 | if actual != expected { 26 | t.Errorf("%s, \"%s\": (expected) %v != %v (actual)", c.time, c.date, expected, actual) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /logging/logging.go: -------------------------------------------------------------------------------- 1 | package logging 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "github.com/sirupsen/logrus" 8 | ) 9 | 10 | type LogSplitter struct{} 11 | 12 | // Levels returns levels that are supported by the hook 13 | func (l *LogSplitter) Levels() []logrus.Level { 14 | return []logrus.Level{logrus.PanicLevel, logrus.FatalLevel, logrus.ErrorLevel, logrus.WarnLevel, logrus.InfoLevel, logrus.DebugLevel, logrus.TraceLevel} 15 | } 16 | 17 | // Fire handles logging events based on log levels. 18 | func (l *LogSplitter) Fire(entry *logrus.Entry) error { 19 | if entry == nil { 20 | return fmt.Errorf("logrus entry is nil") 21 | } 22 | 23 | switch entry.Level { 24 | case logrus.WarnLevel, logrus.DebugLevel, logrus.InfoLevel, logrus.TraceLevel: 25 | entry.Logger.Out = os.Stdout 26 | case logrus.ErrorLevel, logrus.PanicLevel, logrus.FatalLevel: 27 | entry.Logger.Out = os.Stderr 28 | default: 29 | entry.Logger.Out = os.Stdout 30 | } 31 | return nil 32 | } 33 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | // Command that implements the main executable. 2 | package main 3 | 4 | import ( 5 | "github.com/distribworks/dkron/v4/cmd" 6 | ) 7 | 8 | func main() { 9 | cmd.Execute() 10 | } 11 | -------------------------------------------------------------------------------- /plugin/plugin.go: -------------------------------------------------------------------------------- 1 | package plugin 2 | 3 | import ( 4 | "github.com/hashicorp/go-plugin" 5 | ) 6 | 7 | // See serve.go for serving plugins 8 | 9 | // PluginMap should be used by clients for the map of plugins. 10 | var PluginMap = map[string]plugin.Plugin{ 11 | "processor": &ProcessorPlugin{}, 12 | "executor": &ExecutorPlugin{}, 13 | } 14 | -------------------------------------------------------------------------------- /plugin/shell/shell_test.go: -------------------------------------------------------------------------------- 1 | package shell 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func Test_buildCmdInvalidInput(t *testing.T) { 11 | assert.NotPanics(t, func() { buildCmd("", false, []string{}, "") }) 12 | } 13 | 14 | func Test_buildCmd(t *testing.T) { 15 | 16 | // test shell command 17 | cmd, err := buildCmd("echo 'test1' && echo 'success'", true, []string{}, "") 18 | assert.NoError(t, err) 19 | out, err := cmd.CombinedOutput() 20 | assert.NoError(t, err) 21 | assert.Equal(t, "test1\nsuccess\n", string(out)) 22 | 23 | // test not shell command 24 | cmd, err = buildCmd("date && echo 'success'", false, []string{}, "") 25 | assert.NoError(t, err) 26 | assert.Len(t, cmd.Args, 1) 27 | } 28 | 29 | func Test_buildCmdWithCustomEnvironmentVariables(t *testing.T) { 30 | defer func() { 31 | os.Setenv("Foo", "") 32 | }() 33 | os.Setenv("Foo", "Bar") 34 | 35 | cmd, err := buildCmd("echo $Foo && echo $He", true, []string{"Foo=Toto", "He=Ho"}, "") 36 | assert.NoError(t, err) 37 | out, err := cmd.CombinedOutput() 38 | assert.NoError(t, err) 39 | assert.Equal(t, "Toto\nHo\n", string(out)) 40 | 41 | } 42 | -------------------------------------------------------------------------------- /plugin/shell/shell_unix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package shell 5 | 6 | import ( 7 | "os/exec" 8 | "os/user" 9 | "strconv" 10 | "strings" 11 | "syscall" 12 | ) 13 | 14 | func setCmdAttr(cmd *exec.Cmd, config map[string]string) error { 15 | su := config["su"] 16 | if su != "" { 17 | var uid, gid int 18 | parts := strings.Split(su, ":") 19 | u, err := user.Lookup(parts[0]) 20 | if err != nil { 21 | return err 22 | } 23 | uid, _ = strconv.Atoi(u.Uid) 24 | if len(parts) > 1 { 25 | g, err := user.LookupGroup(parts[1]) 26 | if err != nil { 27 | return err 28 | } 29 | gid, _ = strconv.Atoi(g.Gid) 30 | } else { 31 | gid, _ = strconv.Atoi(u.Gid) 32 | } 33 | cmd.SysProcAttr.Credential = &syscall.Credential{ 34 | Uid: uint32(uid), 35 | Gid: uint32(gid), 36 | } 37 | } 38 | 39 | jobTimeout := config["timeout"] 40 | if jobTimeout != "" { 41 | cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} 42 | } 43 | return nil 44 | } 45 | 46 | func processKill(cmd *exec.Cmd) error { 47 | return syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL) // note the minus sign 48 | } 49 | -------------------------------------------------------------------------------- /plugin/shell/shell_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package shell 5 | 6 | import ( 7 | "os/exec" 8 | ) 9 | 10 | func setCmdAttr(cmd *exec.Cmd, config map[string]string) error { 11 | return nil 12 | } 13 | 14 | func processKill(cmd *exec.Cmd) error { 15 | return cmd.Process.Kill() 16 | } 17 | -------------------------------------------------------------------------------- /proto/executor.proto: -------------------------------------------------------------------------------- 1 | // protoc -I proto/ --go_out=plugin/types --go_opt=paths=source_relative --go-grpc_out=plugin/types --go-grpc_opt=paths=source_relative executor.proto 2 | syntax = "proto3"; 3 | 4 | package types; 5 | option go_package = "github.com/distribworks/dkron/plugin/types"; 6 | 7 | message ExecuteRequest { 8 | string job_name = 1; 9 | map config = 2; 10 | uint32 status_server = 3; 11 | } 12 | 13 | message ExecuteResponse { 14 | bytes output = 1; 15 | string error = 2; 16 | } 17 | 18 | service Executor { 19 | rpc Execute (ExecuteRequest) returns (ExecuteResponse); 20 | } 21 | 22 | message StatusUpdateRequest { 23 | bytes output = 2; 24 | bool error = 3; 25 | } 26 | 27 | message StatusUpdateResponse { 28 | int64 r = 1; 29 | } 30 | 31 | service StatusHelper { 32 | rpc Update(StatusUpdateRequest) returns (StatusUpdateResponse); 33 | } 34 | -------------------------------------------------------------------------------- /scripts/.validate: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -z "$VALIDATE_UPSTREAM" ]; then 4 | # this is kind of an expensive check, so let's not do this twice if we 5 | # are running more than one validate bundlescript 6 | 7 | VALIDATE_REPO='https://github.com/distribworks/dkron.git' 8 | VALIDATE_BRANCH='master' 9 | 10 | if [ "$TRAVIS" = 'true' -a "$TRAVIS_PULL_REQUEST" != 'false' ]; then 11 | VALIDATE_REPO="https://github.com/${TRAVIS_REPO_SLUG}.git" 12 | VALIDATE_BRANCH="${TRAVIS_BRANCH}" 13 | fi 14 | 15 | VALIDATE_HEAD="$(git rev-parse --verify HEAD)" 16 | 17 | git fetch -q "$VALIDATE_REPO" "refs/heads/$VALIDATE_BRANCH" 18 | VALIDATE_UPSTREAM="$(git rev-parse --verify FETCH_HEAD)" 19 | 20 | VALIDATE_COMMIT_LOG="$VALIDATE_UPSTREAM..$VALIDATE_HEAD" 21 | VALIDATE_COMMIT_DIFF="$VALIDATE_UPSTREAM...$VALIDATE_HEAD" 22 | 23 | validate_diff() { 24 | if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then 25 | git diff "$VALIDATE_COMMIT_DIFF" "$@" 26 | fi 27 | } 28 | validate_log() { 29 | if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then 30 | git log "$VALIDATE_COMMIT_LOG" "$@" 31 | fi 32 | } 33 | fi 34 | -------------------------------------------------------------------------------- /scripts/cluster: -------------------------------------------------------------------------------- 1 | scripts/run agent --server --node-name=node1 --log-level=debug --bootstrap-expect=3 2 | 3 | scripts/run agent --server --node-name=node2 --bind-addr={{GetPrivateIP}}:8947 \ 4 | --rpc-port=6869 --data-dir=node2.data --http-addr=:8081 \ 5 | --retry-join={{GetPrivateIP}}:8946 --log-level=debug --bootstrap-expect=3 6 | 7 | scripts/run agent --server --node-name=node3 --bind-addr={{GetPrivateIP}}:8948 \ 8 | --rpc-port=6870 --data-dir=node3.data --http-addr=:8082 \ 9 | --retry-join={{GetPrivateIP}}:8946 --log-level=debug --bootstrap-expect=3 10 | -------------------------------------------------------------------------------- /scripts/jobs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for i in {1..2000} 4 | do 5 | curl test.dkron.io:8080/v1/jobs -d "{ 6 | \"name\": \"test_job_$i\", 7 | \"schedule\": \"@every $(($RANDOM%10+1))s\", 8 | \"concurrency\": \"forbid\", 9 | \"tags\": { 10 | \"role\": \"dkron:1\" 11 | }, 12 | \"executor\": \"http\", 13 | \"executor_config\": { 14 | \"method\": \"GET\", 15 | \"url\": \"https://httpbin.org/get\" 16 | } 17 | }, 18 | \"ephemeral\": false, 19 | }" 20 | done 21 | -------------------------------------------------------------------------------- /scripts/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | GOBIN=`pwd` go clean -i ./builtin/... 6 | GOBIN=`pwd` go clean 7 | GOBIN=`pwd` go install ./builtin/... 8 | go build -o main 9 | exec ./main $@ 10 | -------------------------------------------------------------------------------- /scripts/setup_test_subnet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script makes sure that 127.0.0.x is routable. On Darwin, there 4 | # is a bug that it isn't routable and this causes errors. 5 | # 6 | 7 | # Fail if any commands fail (unchecked), namely sudo and ifconfig. 8 | set -e 9 | 10 | # Check if loopback is setup 11 | if ping -c 1 -W 10 127.0.0.2 > /dev/null 2>&1 12 | then 13 | exit 14 | fi 15 | 16 | # If we're not on OS X, then error 17 | case $OSTYPE in 18 | darwin*) 19 | ;; 20 | *) 21 | echo "Can't setup interfaces on non-Mac. Error!" 22 | exit 1 23 | ;; 24 | esac 25 | 26 | # Setup loopback 27 | echo "Using sudo to setup lo0 interface aliases for testing." 28 | sudo -v 29 | for ((i=2;i<256;i++)) 30 | do 31 | sudo -n ifconfig lo0 alias 127.0.0.$i up 32 | done 33 | -------------------------------------------------------------------------------- /scripts/test: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | set -o pipefail 5 | docker build -t dkron . 6 | docker run dkron scripts/validate-gofmt 7 | docker run dkron go vet 8 | docker run --rm dkron go test -v ./... $1 | sed ''/PASS/s//$(printf "\033[32mPASS\033[0m")/'' | sed ''/FAIL/s//$(printf "\033[31mFAIL\033[0m")/'' 9 | -------------------------------------------------------------------------------- /scripts/validate-gofmt: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source "$(dirname "$BASH_SOURCE")/.validate" 4 | 5 | IFS=$'\n' 6 | files=( $(validate_diff --diff-filter=ACMR --name-only -- '*.go' | grep -v '^Godeps/' || true) ) 7 | unset IFS 8 | 9 | badFiles=() 10 | for f in "${files[@]}"; do 11 | # we use "git show" here to validate that what's committed is formatted 12 | if [ "$(git show "$VALIDATE_HEAD:$f" | gofmt -s -l)" ]; then 13 | badFiles+=( "$f" ) 14 | fi 15 | done 16 | 17 | if [ ${#badFiles[@]} -eq 0 ]; then 18 | echo 'Congratulations! All Go source files are properly formatted.' 19 | else 20 | { 21 | echo "These files are not properly gofmt'd:" 22 | for f in "${badFiles[@]}"; do 23 | echo " - $f" 24 | done 25 | echo 26 | echo 'Please reformat the above files using "gofmt -s -w" and commit the result.' 27 | echo 28 | } >&2 29 | false 30 | fi 31 | -------------------------------------------------------------------------------- /types/execution.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | fmt "fmt" 5 | ) 6 | 7 | // Key computes the execution key 8 | func (e *Execution) Key() string { 9 | sa := e.StartedAt.AsTime() 10 | return fmt.Sprintf("%d-%s", sa.UnixNano(), e.NodeName) 11 | } 12 | -------------------------------------------------------------------------------- /types/member.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import "github.com/hashicorp/serf/serf" 4 | 5 | type Member struct { 6 | serf.Member 7 | 8 | Id string `json:"id"` 9 | StatusText string `json:"statusText"` 10 | } 11 | -------------------------------------------------------------------------------- /ui/.env: -------------------------------------------------------------------------------- 1 | VITE_SIMPLE_REST_URL=http://my.api.url/ 2 | 3 | -------------------------------------------------------------------------------- /ui/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "extends": [ 3 | "eslint:recommended", 4 | "plugin:react/recommended", 5 | "plugin:react/jsx-runtime", 6 | "plugin:react-hooks/recommended", 7 | "prettier" 8 | ], 9 | "parser": "@typescript-eslint/parser", 10 | "plugins": ["@typescript-eslint"], 11 | "env": { 12 | "browser": true, 13 | "es2021": true 14 | }, 15 | "settings": { 16 | "react": { 17 | "version": "detect" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ui/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /ui/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | -------------------------------------------------------------------------------- /ui/README.md: -------------------------------------------------------------------------------- 1 | # ui 2 | 3 | ## Installation 4 | 5 | Install the application dependencies by running: 6 | 7 | ```sh 8 | yarn 9 | ``` 10 | 11 | ## Development 12 | 13 | Start the application in development mode by running: 14 | 15 | ```sh 16 | yarn dev 17 | ``` 18 | 19 | ## Production 20 | 21 | Build the application in production mode by running: 22 | 23 | ```sh 24 | yarn build 25 | ``` 26 | 27 | ## DataProvider 28 | 29 | The included data provider use [ra-data-simple-rest](https://github.com/marmelab/react-admin/tree/master/packages/ra-data-simple-rest). It fits REST APIs using simple GET parameters for filters and sorting. This is the dialect used for instance in [FakeRest](https://github.com/marmelab/FakeRest). 30 | 31 | You'll find an `.env` file at the project root that includes a `VITE_JSON_SERVER_URL` variable. Set it to the URL of your backend. 32 | 33 | -------------------------------------------------------------------------------- /ui/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {} -------------------------------------------------------------------------------- /ui/public/dkron-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/ui/public/dkron-logo.png -------------------------------------------------------------------------------- /ui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/ui/public/favicon.ico -------------------------------------------------------------------------------- /ui/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/ui/public/logo512.png -------------------------------------------------------------------------------- /ui/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "ui", 3 | "name": "{{name}}", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /ui/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: -------------------------------------------------------------------------------- /ui/src/TagsField.tsx: -------------------------------------------------------------------------------- 1 | import { Chip } from '@mui/material'; 2 | import { useRecordContext } from 'react-admin'; 3 | 4 | export const TagsField = () => { 5 | const record = useRecordContext(); 6 | if (record === undefined) { 7 | return null 8 | } else { 9 | return 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /ui/src/authProvider.ts: -------------------------------------------------------------------------------- 1 | import { AuthProvider } from 'react-admin'; 2 | 3 | const authProvider: AuthProvider = { 4 | login: ({ token }) => { 5 | localStorage.setItem('token', token); 6 | return Promise.resolve(); 7 | }, 8 | logout: () => { 9 | localStorage.removeItem('token'); 10 | return Promise.resolve(); 11 | }, 12 | checkAuth: () => 13 | localStorage.getItem('token') ? Promise.resolve() : Promise.reject(), 14 | checkError: (error) => { 15 | const status = error.status; 16 | if (status === 401 || status === 403) { 17 | localStorage.removeItem('token'); 18 | return Promise.reject(); 19 | } 20 | // other error code (404, 500, etc): no need to log out 21 | return Promise.resolve(); 22 | }, 23 | getIdentity: () => Promise.resolve(), 24 | getPermissions: () => Promise.resolve(), 25 | }; 26 | 27 | export default authProvider; 28 | -------------------------------------------------------------------------------- /ui/src/dashboard/FailedJobs.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { FC } from 'react'; 3 | import Icon from '@mui/icons-material/ThumbDown'; 4 | 5 | import CardWithIcon from './CardWithIcon'; 6 | 7 | interface Props { 8 | value?: string; 9 | } 10 | 11 | const FailedJobs: FC = ({ value }) => { 12 | return ( 13 | 19 | ); 20 | }; 21 | 22 | export default FailedJobs; 23 | -------------------------------------------------------------------------------- /ui/src/dashboard/Leader.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { FC } from 'react'; 3 | import Icon from '@mui/icons-material/DeviceHub'; 4 | 5 | import CardWithIcon from './CardWithIcon'; 6 | 7 | interface Props { 8 | value?: string; 9 | } 10 | 11 | const Leader: FC = ({ value }) => { 12 | return ( 13 | 19 | ); 20 | }; 21 | 22 | export default Leader; 23 | -------------------------------------------------------------------------------- /ui/src/dashboard/SuccessfulJobs.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { FC } from 'react'; 3 | import Icon from '@mui/icons-material/ThumbUp'; 4 | 5 | import CardWithIcon from './CardWithIcon'; 6 | 7 | interface Props { 8 | value?: string; 9 | } 10 | 11 | const SuccessfulJobs: FC = ({ value }) => { 12 | return ( 13 | 19 | ); 20 | }; 21 | 22 | export default SuccessfulJobs; 23 | -------------------------------------------------------------------------------- /ui/src/dashboard/TotalJobs.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { FC } from 'react'; 3 | import Icon from '@mui/icons-material/Update'; 4 | 5 | import CardWithIcon from './CardWithIcon'; 6 | 7 | interface Props { 8 | value?: string; 9 | } 10 | 11 | const TotalJobs: FC = ({ value }) => { 12 | return ( 13 | 19 | ); 20 | }; 21 | 22 | export default TotalJobs; 23 | -------------------------------------------------------------------------------- /ui/src/dashboard/UntriggeredJobs.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { FC } from 'react'; 3 | import Icon from '@mui/icons-material/NewReleases'; 4 | 5 | import CardWithIcon from './CardWithIcon'; 6 | 7 | interface Props { 8 | value?: string; 9 | } 10 | 11 | const UntriggeredJobs: FC = ({ value }) => { 12 | return ( 13 | 19 | ); 20 | }; 21 | 22 | export default UntriggeredJobs; 23 | -------------------------------------------------------------------------------- /ui/src/dashboard/index.ts: -------------------------------------------------------------------------------- 1 | import Dashboard from './Dashboard'; 2 | 3 | export default Dashboard; 4 | -------------------------------------------------------------------------------- /ui/src/executions/BusyList.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { List, Datagrid, TextField, DateField } from 'react-admin'; 3 | 4 | export const OutputPanel = ({ id, record, resource }: any) => { 5 | return (
{record?.output || "Empty output"}
); 6 | }; 7 | 8 | export const BusyList = (props: any) => ( 9 | 10 | false } expand={}> 11 | 12 | 13 | 14 | 15 | 16 | 17 | ); 18 | export default BusyList; 19 | -------------------------------------------------------------------------------- /ui/src/executions/index.ts: -------------------------------------------------------------------------------- 1 | import BusyList from './BusyList'; 2 | 3 | export default BusyList; 4 | -------------------------------------------------------------------------------- /ui/src/images/dkron-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/ui/src/images/dkron-logo.png -------------------------------------------------------------------------------- /ui/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import { App } from "./App"; 4 | 5 | ReactDOM.createRoot(document.getElementById("root")!).render( 6 | 7 | 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /ui/src/jobs/EnabledField.tsx: -------------------------------------------------------------------------------- 1 | import SuccessIcon from '@mui/icons-material/CheckCircle'; 2 | import FailedIcon from '@mui/icons-material/Cancel'; 3 | import { Tooltip } from '@mui/material'; 4 | import { useRecordContext } from 'react-admin'; 5 | 6 | const EnabledField = () => { 7 | const record = useRecordContext(); 8 | 9 | if (record.disabled) { 10 | return 11 | } else { 12 | return 13 | } 14 | }; 15 | 16 | export default EnabledField; 17 | -------------------------------------------------------------------------------- /ui/src/jobs/StatusField.tsx: -------------------------------------------------------------------------------- 1 | import SuccessIcon from '@mui/icons-material/CheckCircle'; 2 | import FailedIcon from '@mui/icons-material/Cancel'; 3 | import UntriggeredIcon from '@mui/icons-material/Timer'; 4 | import { Tooltip } from '@mui/material'; 5 | import { useRecordContext } from 'react-admin'; 6 | 7 | const StatusField = () => { 8 | const record = useRecordContext(); 9 | 10 | if (record.status === 'success') { 11 | return 12 | } else if (record.status === 'failed') { 13 | return 14 | } else { 15 | return 16 | } 17 | }; 18 | 19 | export default StatusField; 20 | -------------------------------------------------------------------------------- /ui/src/jobs/ZeroDateField.tsx: -------------------------------------------------------------------------------- 1 | import { DateField, DateFieldProps } from 'react-admin'; 2 | 3 | export const ZeroDateField: React.FC = (props) => { 4 | if (props.record !== undefined && props.source !== undefined) { 5 | if (props.record[props.source] === "0001-01-01T00:00:00Z") { 6 | props.record[props.source] = null; 7 | } 8 | } 9 | return (); 10 | } 11 | 12 | export default ZeroDateField; 13 | -------------------------------------------------------------------------------- /ui/src/jobs/index.ts: -------------------------------------------------------------------------------- 1 | import JobList from './JobList'; 2 | import { JobEdit, JobCreate } from './JobEdit'; 3 | import JobShow from './JobShow'; 4 | import JobIcon from '@mui/icons-material/Update'; 5 | 6 | const jobs = { 7 | list: JobList, 8 | edit: JobEdit, 9 | create: JobCreate, 10 | show: JobShow, 11 | icon: JobIcon 12 | }; 13 | export default jobs; 14 | -------------------------------------------------------------------------------- /ui/src/layout/Clock.tsx: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | 3 | class Clock extends Component<{}, { date: Date }> { 4 | timer: any; 5 | 6 | constructor(props: any){ 7 | super(props); 8 | this.state = {date: new Date()}; 9 | } 10 | 11 | componentDidMount() { 12 | this.timer = setInterval( 13 | () => this.setState({date: new Date()}), 14 | 1000 15 | ); 16 | } 17 | 18 | componentWillUnmount() { 19 | clearInterval(this.timer); 20 | } 21 | 22 | render(){ 23 | return( 24 |
25 |
{this.state.date.toLocaleTimeString()}
26 |
27 | ) 28 | } 29 | } 30 | export default Clock 31 | -------------------------------------------------------------------------------- /ui/src/layout/ThemedLayout.tsx: -------------------------------------------------------------------------------- 1 | import { Layout, LayoutProps, Sidebar } from 'react-admin'; 2 | import AppBar from './AppBar'; 3 | 4 | const CustomSidebar = (props: any) => ; 5 | 6 | const ThemedLayout = (props: LayoutProps) => { 7 | return ( 8 | 13 | ); 14 | }; 15 | export default ThemedLayout; 16 | -------------------------------------------------------------------------------- /ui/src/layout/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | 15 | .execution-output { 16 | white-space: break-spaces; 17 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 18 | monospace; 19 | max-height: 300px; 20 | overflow: auto; 21 | } 22 | 23 | .clock { 24 | width: 100px; 25 | } 26 | -------------------------------------------------------------------------------- /ui/src/layout/index.ts: -------------------------------------------------------------------------------- 1 | import AppBar from './AppBar'; 2 | import Layout from './ThemedLayout'; 3 | import './index.css'; 4 | 5 | export { AppBar, Layout }; 6 | -------------------------------------------------------------------------------- /ui/src/routes.tsx: -------------------------------------------------------------------------------- 1 | import { Route } from 'react-router-dom'; 2 | import Configuration from './settings/Settings'; 3 | 4 | const Routes = [ 5 | } />, 6 | ]; 7 | 8 | export default Routes; 9 | -------------------------------------------------------------------------------- /ui/src/settings/Settings.tsx: -------------------------------------------------------------------------------- 1 | import Card from '@mui/material/Card'; 2 | import CardContent from '@mui/material/CardContent'; 3 | import Button from '@mui/material/Button'; 4 | import { Title } from 'react-admin'; 5 | import { makeStyles } from '@mui/styles'; 6 | import { changeTheme } from './actions'; 7 | 8 | const useStyles = makeStyles({ 9 | label: { width: '10em', display: 'inline-block' }, 10 | button: { margin: '1em' }, 11 | }); 12 | 13 | const Settings = () => { 14 | const classes = useStyles(); 15 | return ( 16 | 17 | 18 | <CardContent> 19 | </CardContent> 20 | </Card> 21 | ); 22 | }; 23 | 24 | export default Settings; 25 | -------------------------------------------------------------------------------- /ui/src/settings/actions.ts: -------------------------------------------------------------------------------- 1 | import { ThemeName } from '../types'; 2 | 3 | export const CHANGE_THEME = 'CHANGE_THEME'; 4 | 5 | export const changeTheme = (theme: ThemeName) => ({ 6 | type: CHANGE_THEME, 7 | payload: theme, 8 | }); 9 | -------------------------------------------------------------------------------- /ui/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// <reference types="vite/client" /> 2 | -------------------------------------------------------------------------------- /ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "module": "esnext", 17 | "moduleResolution": "node", 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "noEmit": true, 21 | "jsx": "react-jsx" 22 | }, 23 | "include": [ 24 | "src" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /ui/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import react from '@vitejs/plugin-react'; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | define: { 8 | 'process.env': process.env, 9 | }, 10 | server: { 11 | host: true, 12 | }, 13 | base: './', 14 | }); 15 | -------------------------------------------------------------------------------- /website/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | -------------------------------------------------------------------------------- /website/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. 4 | 5 | ### Installation 6 | 7 | ``` 8 | $ yarn 9 | ``` 10 | 11 | ### Local Development 12 | 13 | ``` 14 | $ yarn start 15 | ``` 16 | 17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. 18 | 19 | ### Build 20 | 21 | ``` 22 | $ yarn build 23 | ``` 24 | 25 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 26 | 27 | ### Deployment 28 | 29 | Using SSH: 30 | 31 | ``` 32 | $ USE_SSH=true yarn deploy 33 | ``` 34 | 35 | Not using SSH: 36 | 37 | ``` 38 | $ GIT_USER=<Your GitHub username> yarn deploy 39 | ``` 40 | 41 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. 42 | -------------------------------------------------------------------------------- /website/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /website/blog/authors.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/blog/authors.yml -------------------------------------------------------------------------------- /website/bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/bun.lockb -------------------------------------------------------------------------------- /website/docs/basics/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Basics", 3 | "position": 1 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/cli/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "CLI" 3 | } 4 | -------------------------------------------------------------------------------- /website/docs/cli/dkron_completion_fish.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron completion fish" 4 | slug: dkron_completion_fish 5 | url: /cli/dkron_completion_fish/ 6 | --- 7 | ## dkron completion fish 8 | 9 | Generate the autocompletion script for fish 10 | 11 | ### Synopsis 12 | 13 | Generate the autocompletion script for the fish shell. 14 | 15 | To load completions in your current shell session: 16 | 17 | dkron completion fish | source 18 | 19 | To load completions for every new session, execute once: 20 | 21 | dkron completion fish > ~/.config/fish/completions/dkron.fish 22 | 23 | You will need to start a new shell for this setup to take effect. 24 | 25 | 26 | ``` 27 | dkron completion fish [flags] 28 | ``` 29 | 30 | ### Options 31 | 32 | ``` 33 | -h, --help help for fish 34 | --no-descriptions disable completion descriptions 35 | ``` 36 | 37 | ### Options inherited from parent commands 38 | 39 | ``` 40 | --config string config file path 41 | ``` 42 | 43 | ### SEE ALSO 44 | 45 | * [dkron completion](/docs/cli/dkron_completion/) - Generate the autocompletion script for the specified shell 46 | 47 | ###### Auto generated by spf13/cobra on 5-Jun-2022 48 | -------------------------------------------------------------------------------- /website/docs/cli/dkron_completion_powershell.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron completion powershell" 4 | slug: dkron_completion_powershell 5 | url: /cli/dkron_completion_powershell/ 6 | --- 7 | ## dkron completion powershell 8 | 9 | Generate the autocompletion script for powershell 10 | 11 | ### Synopsis 12 | 13 | Generate the autocompletion script for powershell. 14 | 15 | To load completions in your current shell session: 16 | 17 | dkron completion powershell | Out-String | Invoke-Expression 18 | 19 | To load completions for every new session, add the output of the above command 20 | to your powershell profile. 21 | 22 | 23 | ``` 24 | dkron completion powershell [flags] 25 | ``` 26 | 27 | ### Options 28 | 29 | ``` 30 | -h, --help help for powershell 31 | --no-descriptions disable completion descriptions 32 | ``` 33 | 34 | ### Options inherited from parent commands 35 | 36 | ``` 37 | --config string config file path 38 | ``` 39 | 40 | ### SEE ALSO 41 | 42 | * [dkron completion](/docs/cli/dkron_completion/) - Generate the autocompletion script for the specified shell 43 | 44 | ###### Auto generated by spf13/cobra on 5-Jun-2022 45 | -------------------------------------------------------------------------------- /website/docs/cli/dkron_doc.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron doc" 4 | slug: dkron_doc 5 | url: /cli/dkron_doc/ 6 | --- 7 | ## dkron doc 8 | 9 | Generate Markdown documentation for the Dkron CLI. 10 | 11 | ### Synopsis 12 | 13 | Generate Markdown documentation for the Dkron CLI. 14 | This command is, mostly, used to create up-to-date documentation 15 | of Dkron's command-line interface for http://dkron.io/. 16 | It creates one Markdown file per command with front matter suitable 17 | for rendering in Hugo. 18 | 19 | ``` 20 | dkron doc [flags] 21 | ``` 22 | 23 | ### Options 24 | 25 | ``` 26 | --dir string the directory to write the doc. (default "/tmp/dkrondoc/") 27 | -h, --help help for doc 28 | ``` 29 | 30 | ### Options inherited from parent commands 31 | 32 | ``` 33 | --config string config file path 34 | ``` 35 | 36 | ### SEE ALSO 37 | 38 | * [dkron](/docs/cli/dkron/) - Open source distributed job scheduling system 39 | 40 | ###### Auto generated by spf13/cobra on 5-Jun-2022 41 | -------------------------------------------------------------------------------- /website/docs/cli/dkron_keygen.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron keygen" 4 | slug: dkron_keygen 5 | url: /cli/dkron_keygen/ 6 | --- 7 | ## dkron keygen 8 | 9 | Generates a new encryption key 10 | 11 | ### Synopsis 12 | 13 | Generates a new encryption key that can be used to configure the 14 | agent to encrypt traffic. The output of this command is already 15 | in the proper format that the agent expects. 16 | 17 | ``` 18 | dkron keygen [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for keygen 25 | ``` 26 | 27 | ### Options inherited from parent commands 28 | 29 | ``` 30 | --config string config file path 31 | ``` 32 | 33 | ### SEE ALSO 34 | 35 | * [dkron](/docs/cli/dkron/) - Open source distributed job scheduling system 36 | 37 | ###### Auto generated by spf13/cobra on 5-Jun-2022 38 | -------------------------------------------------------------------------------- /website/docs/cli/dkron_leave.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron leave" 4 | slug: dkron_leave 5 | url: /cli/dkron_leave/ 6 | --- 7 | ## dkron leave 8 | 9 | Force an agent to leave the cluster 10 | 11 | ### Synopsis 12 | 13 | Stop stops an agent, if the agent is a server and is running for election 14 | stop running for election, if this server was the leader 15 | this will force the cluster to elect a new leader and start a new scheduler. 16 | 17 | ``` 18 | dkron leave [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for leave 25 | --rpc-addr string gRPC address of the agent (default "{{ GetPrivateIP }}:6868") 26 | ``` 27 | 28 | ### Options inherited from parent commands 29 | 30 | ``` 31 | --config string config file path 32 | ``` 33 | 34 | ### SEE ALSO 35 | 36 | * [dkron](/docs/cli/dkron/) - Open source distributed job scheduling system 37 | 38 | ###### Auto generated by spf13/cobra on 5-Jun-2022 39 | -------------------------------------------------------------------------------- /website/docs/cli/dkron_raft.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron raft" 4 | slug: dkron_raft 5 | url: /cli/dkron_raft/ 6 | --- 7 | ## dkron raft 8 | 9 | Command to perform some raft operations 10 | 11 | ### Options 12 | 13 | ``` 14 | -h, --help help for raft 15 | --rpc-addr string gRPC address of the agent. (default "{{ GetPrivateIP }}:6868") 16 | ``` 17 | 18 | ### Options inherited from parent commands 19 | 20 | ``` 21 | --config string config file path 22 | ``` 23 | 24 | ### SEE ALSO 25 | 26 | * [dkron](/docs/cli/dkron/) - Open source distributed job scheduling system 27 | * [dkron raft list-peers](/docs/cli/dkron_raft_list-peers/) - Command to list raft peers 28 | * [dkron raft remove-peer](/docs/cli/dkron_raft_remove-peer/) - Command to list raft peers 29 | 30 | ###### Auto generated by spf13/cobra on 5-Jun-2022 31 | -------------------------------------------------------------------------------- /website/docs/cli/dkron_raft_list-peers.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron raft list-peers" 4 | slug: dkron_raft_list-peers 5 | url: /cli/dkron_raft_list-peers/ 6 | --- 7 | ## dkron raft list-peers 8 | 9 | Command to list raft peers 10 | 11 | ``` 12 | dkron raft list-peers [flags] 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for list-peers 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --config string config file path 25 | --rpc-addr string gRPC address of the agent. (default "{{ GetPrivateIP }}:6868") 26 | ``` 27 | 28 | ### SEE ALSO 29 | 30 | * [dkron raft](/docs/cli/dkron_raft/) - Command to perform some raft operations 31 | 32 | ###### Auto generated by spf13/cobra on 5-Jun-2022 33 | -------------------------------------------------------------------------------- /website/docs/cli/dkron_raft_remove-peer.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron raft remove-peer" 4 | slug: dkron_raft_remove-peer 5 | url: /cli/dkron_raft_remove-peer/ 6 | --- 7 | ## dkron raft remove-peer 8 | 9 | Command to list raft peers 10 | 11 | ``` 12 | dkron raft remove-peer [flags] 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for remove-peer 19 | --peer-id string Remove a Dkron server with the given ID from the Raft configuration. 20 | ``` 21 | 22 | ### Options inherited from parent commands 23 | 24 | ``` 25 | --config string config file path 26 | --rpc-addr string gRPC address of the agent. (default "{{ GetPrivateIP }}:6868") 27 | ``` 28 | 29 | ### SEE ALSO 30 | 31 | * [dkron raft](/docs/cli/dkron_raft/) - Command to perform some raft operations 32 | 33 | ###### Auto generated by spf13/cobra on 5-Jun-2022 34 | -------------------------------------------------------------------------------- /website/docs/cli/dkron_version.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron version" 4 | slug: dkron_version 5 | url: /cli/dkron_version/ 6 | --- 7 | ## dkron version 8 | 9 | Show version 10 | 11 | ### Synopsis 12 | 13 | Show the version 14 | 15 | ``` 16 | dkron version [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for version 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file path 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [dkron](/docs/cli/dkron/) - Open source distributed job scheduling system 34 | 35 | ###### Auto generated by spf13/cobra on 5-Jun-2022 36 | -------------------------------------------------------------------------------- /website/docs/pro/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Pro" 3 | } 4 | -------------------------------------------------------------------------------- /website/docs/pro/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dkron Pro 3 | weight: 40 4 | --- 5 | 6 | {{% children style="li" depth="999" %}} 7 | -------------------------------------------------------------------------------- /website/docs/pro/cli/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "CLI" 3 | } 4 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_acl_bootstrap.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron acl bootstrap" 4 | slug: dkron_acl_bootstrap 5 | url: /docs/pro/cli/dkron_acl_bootstrap/ 6 | --- 7 | ## dkron acl bootstrap 8 | 9 | Bootstrap ACL policies 10 | 11 | ### Synopsis 12 | 13 | Bootstrap ACL policies. This command allows to bootstrap ACL policies. 14 | 15 | ``` 16 | dkron acl bootstrap [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for bootstrap 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file (default is /etc/dkron/dkron.yml) 29 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 30 | ``` 31 | 32 | ### SEE ALSO 33 | 34 | * [dkron acl](/docs/pro/cli/dkron_acl/) - Control ACL policies 35 | 36 | ###### Auto generated by spf13/cobra on 6-Oct-2024 37 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_acl_policy.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron acl policy" 4 | slug: dkron_acl_policy 5 | url: /docs/pro/cli/dkron_acl_policy/ 6 | --- 7 | ## dkron acl policy 8 | 9 | Operate ACL policies 10 | 11 | ### Synopsis 12 | 13 | Operate ACL policies. This command allows to manage ACL policies. 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for policy 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --config string config file (default is /etc/dkron/dkron.yml) 25 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 26 | ``` 27 | 28 | ### SEE ALSO 29 | 30 | * [dkron acl](/docs/pro/cli/dkron_acl/) - Control ACL policies 31 | * [dkron acl policy apply](/docs/pro/cli/dkron_acl_policy_apply/) - Apply ACL policies 32 | * [dkron acl policy delete](/docs/pro/cli/dkron_acl_policy_delete/) - Delete ACL policies 33 | * [dkron acl policy info](/docs/pro/cli/dkron_acl_policy_info/) - Info ACL policy 34 | * [dkron acl policy list](/docs/pro/cli/dkron_acl_policy_list/) - List ACL policies 35 | 36 | ###### Auto generated by spf13/cobra on 6-Oct-2024 37 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_acl_policy_delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron acl policy delete" 4 | slug: dkron_acl_policy_delete 5 | url: /docs/pro/cli/dkron_acl_policy_delete/ 6 | --- 7 | ## dkron acl policy delete 8 | 9 | Delete ACL policies 10 | 11 | ### Synopsis 12 | 13 | Delete ACL policies. This command allows to apply ACL policies. 14 | 15 | ``` 16 | dkron acl policy delete [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | --cert-file string Path to the client server TLS cert file 23 | -h, --help help for delete 24 | --key-file string Path to the client server TLS key file 25 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 26 | --trusted-ca-file string Path to the client server TLS trusted CA cert file 27 | ``` 28 | 29 | ### Options inherited from parent commands 30 | 31 | ``` 32 | --config string config file (default is /etc/dkron/dkron.yml) 33 | ``` 34 | 35 | ### SEE ALSO 36 | 37 | * [dkron acl policy](/docs/pro/cli/dkron_acl_policy/) - Operate ACL policies 38 | 39 | ###### Auto generated by spf13/cobra on 6-Oct-2024 40 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_acl_policy_info.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron acl policy info" 4 | slug: dkron_acl_policy_info 5 | url: /docs/pro/cli/dkron_acl_policy_info/ 6 | --- 7 | ## dkron acl policy info 8 | 9 | Info ACL policy 10 | 11 | ### Synopsis 12 | 13 | Info ACL policy. Print policy details. 14 | 15 | ``` 16 | dkron acl policy info [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for info 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file (default is /etc/dkron/dkron.yml) 29 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 30 | ``` 31 | 32 | ### SEE ALSO 33 | 34 | * [dkron acl policy](/docs/pro/cli/dkron_acl_policy/) - Operate ACL policies 35 | 36 | ###### Auto generated by spf13/cobra on 6-Oct-2024 37 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_acl_policy_list.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron acl policy list" 4 | slug: dkron_acl_policy_list 5 | url: /docs/pro/cli/dkron_acl_policy_list/ 6 | --- 7 | ## dkron acl policy list 8 | 9 | List ACL policies 10 | 11 | ### Synopsis 12 | 13 | List ACL policies. This command allows to list ACL policies. 14 | 15 | ``` 16 | dkron acl policy list [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for list 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file (default is /etc/dkron/dkron.yml) 29 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 30 | ``` 31 | 32 | ### SEE ALSO 33 | 34 | * [dkron acl policy](/docs/pro/cli/dkron_acl_policy/) - Operate ACL policies 35 | 36 | ###### Auto generated by spf13/cobra on 6-Oct-2024 37 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_acl_token.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron acl token" 4 | slug: dkron_acl_token 5 | url: /docs/pro/cli/dkron_acl_token/ 6 | --- 7 | ## dkron acl token 8 | 9 | Operate ACL tokens 10 | 11 | ### Synopsis 12 | 13 | Operate ACL tokens. This command allows to manage ACL tokens. 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for token 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --config string config file (default is /etc/dkron/dkron.yml) 25 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 26 | ``` 27 | 28 | ### SEE ALSO 29 | 30 | * [dkron acl](/docs/pro/cli/dkron_acl/) - Control ACL policies 31 | * [dkron acl token create](/docs/pro/cli/dkron_acl_token_create/) - Create a new ACL token 32 | * [dkron acl token info](/docs/pro/cli/dkron_acl_token_info/) - Print ACL token details 33 | * [dkron acl token list](/docs/pro/cli/dkron_acl_token_list/) - List ACL tokens 34 | 35 | ###### Auto generated by spf13/cobra on 6-Oct-2024 36 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_acl_token_info.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron acl token info" 4 | slug: dkron_acl_token_info 5 | url: /docs/pro/cli/dkron_acl_token_info/ 6 | --- 7 | ## dkron acl token info 8 | 9 | Print ACL token details 10 | 11 | ### Synopsis 12 | 13 | Print ACL token details. This command allows to print ACL token details. 14 | 15 | ``` 16 | dkron acl token info [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for info 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file (default is /etc/dkron/dkron.yml) 29 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 30 | ``` 31 | 32 | ### SEE ALSO 33 | 34 | * [dkron acl token](/docs/pro/cli/dkron_acl_token/) - Operate ACL tokens 35 | 36 | ###### Auto generated by spf13/cobra on 6-Oct-2024 37 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_acl_token_list.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron acl token list" 4 | slug: dkron_acl_token_list 5 | url: /docs/pro/cli/dkron_acl_token_list/ 6 | --- 7 | ## dkron acl token list 8 | 9 | List ACL tokens 10 | 11 | ### Synopsis 12 | 13 | List ACL tokens. This command allows to list ACL tokens. 14 | 15 | ``` 16 | dkron acl token list [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for list 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file (default is /etc/dkron/dkron.yml) 29 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 30 | ``` 31 | 32 | ### SEE ALSO 33 | 34 | * [dkron acl token](/docs/pro/cli/dkron_acl_token/) - Operate ACL tokens 35 | 36 | ###### Auto generated by spf13/cobra on 6-Oct-2024 37 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_doc.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron doc" 4 | slug: dkron_doc 5 | url: /docs/pro/cli/dkron_doc/ 6 | --- 7 | ## dkron doc 8 | 9 | Generate Markdown documentation for the Dkron CLI. 10 | 11 | ### Synopsis 12 | 13 | Generate Markdown documentation for the Dkron CLI. 14 | This command is, mostly, used to create up-to-date documentation 15 | of Dkron's command-line interface for http://dkron.io/. 16 | It creates one Markdown file per command with front matter suitable 17 | for rendering in Hugo. 18 | 19 | ``` 20 | dkron doc [flags] 21 | ``` 22 | 23 | ### Options 24 | 25 | ``` 26 | --dir string the directory to write the doc. (default "/tmp/dkrondoc/") 27 | -h, --help help for doc 28 | ``` 29 | 30 | ### Options inherited from parent commands 31 | 32 | ``` 33 | --config string config file (default is /etc/dkron/dkron.yml) 34 | ``` 35 | 36 | ### SEE ALSO 37 | 38 | * [dkron](/docs/pro/cli/dkron/) - Professional distributed job scheduling system 39 | 40 | ###### Auto generated by spf13/cobra on 6-Oct-2024 41 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_keygen.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron keygen" 4 | slug: dkron_keygen 5 | url: /docs/pro/cli/dkron_keygen/ 6 | --- 7 | ## dkron keygen 8 | 9 | Generates a new encryption key 10 | 11 | ### Synopsis 12 | 13 | Generates a new encryption key that can be used to configure the 14 | agent to encrypt traffic. The output of this command is already 15 | in the proper format that the agent expects. 16 | 17 | ``` 18 | dkron keygen [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for keygen 25 | ``` 26 | 27 | ### Options inherited from parent commands 28 | 29 | ``` 30 | --config string config file (default is /etc/dkron/dkron.yml) 31 | ``` 32 | 33 | ### SEE ALSO 34 | 35 | * [dkron](/docs/pro/cli/dkron/) - Professional distributed job scheduling system 36 | 37 | ###### Auto generated by spf13/cobra on 6-Oct-2024 38 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_raft.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron raft" 4 | slug: dkron_raft 5 | url: /docs/pro/cli/dkron_raft/ 6 | --- 7 | ## dkron raft 8 | 9 | Command to perform some raft operations 10 | 11 | ### Options 12 | 13 | ``` 14 | --cert-file string Path to the client server TLS cert file 15 | -h, --help help for raft 16 | --key-file string Path to the client server TLS key file 17 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 18 | --trusted-ca-file string Path to the client server TLS trusted CA cert file 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --config string config file (default is /etc/dkron/dkron.yml) 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [dkron](/docs/pro/cli/dkron/) - Professional distributed job scheduling system 30 | * [dkron raft list-peers](/docs/pro/cli/dkron_raft_list-peers/) - Command to list raft peers 31 | * [dkron raft remove-peer](/docs/pro/cli/dkron_raft_remove-peer/) - Command to list raft peers 32 | 33 | ###### Auto generated by spf13/cobra on 6-Oct-2024 34 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_raft_list-peers.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron raft list-peers" 4 | slug: dkron_raft_list-peers 5 | url: /docs/pro/cli/dkron_raft_list-peers/ 6 | --- 7 | ## dkron raft list-peers 8 | 9 | Command to list raft peers 10 | 11 | ``` 12 | dkron raft list-peers [flags] 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for list-peers 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --config string config file (default is /etc/dkron/dkron.yml) 25 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 26 | ``` 27 | 28 | ### SEE ALSO 29 | 30 | * [dkron raft](/docs/pro/cli/dkron_raft/) - Command to perform some raft operations 31 | 32 | ###### Auto generated by spf13/cobra on 6-Oct-2024 33 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_raft_remove-peer.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron raft remove-peer" 4 | slug: dkron_raft_remove-peer 5 | url: /docs/pro/cli/dkron_raft_remove-peer/ 6 | --- 7 | ## dkron raft remove-peer 8 | 9 | Command to list raft peers 10 | 11 | ``` 12 | dkron raft remove-peer [flags] 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for remove-peer 19 | --peer-id string Remove a Dkron server with the given ID from the Raft configuration. 20 | ``` 21 | 22 | ### Options inherited from parent commands 23 | 24 | ``` 25 | --config string config file (default is /etc/dkron/dkron.yml) 26 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 27 | ``` 28 | 29 | ### SEE ALSO 30 | 31 | * [dkron raft](/docs/pro/cli/dkron_raft/) - Command to perform some raft operations 32 | 33 | ###### Auto generated by spf13/cobra on 6-Oct-2024 34 | -------------------------------------------------------------------------------- /website/docs/pro/cli/dkron_version.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2024-10-06 3 | title: "dkron version" 4 | slug: dkron_version 5 | url: /docs/pro/cli/dkron_version/ 6 | --- 7 | ## dkron version 8 | 9 | Show version 10 | 11 | ### Synopsis 12 | 13 | Show the version 14 | 15 | ``` 16 | dkron version [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for version 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file (default is /etc/dkron/dkron.yml) 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [dkron](/docs/pro/cli/dkron/) - Professional distributed job scheduling system 34 | 35 | ###### Auto generated by spf13/cobra on 6-Oct-2024 36 | -------------------------------------------------------------------------------- /website/docs/pro/commercial-support.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Commercial Support 3 | --- 4 | 5 | Dkron offers only community support. Dkro Pro offers priority support via email. 6 | 7 | ## Priority Support 8 | 9 | Covers 1 incident per quarter, with a max response time of 2 working days. Scope is limited to Dkron and Dkron Pro features and APIs, not application integration or infrastructure. For support, email support AT distrib.works. Please email using the same domain as the original license email or explain your connection to the licensed company. 10 | -------------------------------------------------------------------------------- /website/docs/pro/configuration.md: -------------------------------------------------------------------------------- 1 | # Configuration 2 | 3 | Dkron Pro uses the [same parameters](/docs/basics/configuration) as Dkron OSS and add some extra parameters. 4 | 5 | ### Command line options 6 | 7 | * `--username` - Authentication username 8 | * `--password` - Authentication password 9 | * `--cert-file` - Path to the client server TLS cert file 10 | * `--key-file` - Path to the client server TLS key file 11 | * `--client-crl-file` - Path to the client certificate revocation list file 12 | * `--trusted-ca-file` - Path to the client server TLS trusted CA cert file 13 | * `--client-cert-auth` - Enable client cert authentication 14 | * `--auto-tls` - Client TLS using generated certificates 15 | -------------------------------------------------------------------------------- /website/docs/pro/executors/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Executors" 3 | } 4 | -------------------------------------------------------------------------------- /website/docs/pro/executors/docker.md: -------------------------------------------------------------------------------- 1 | # Docker executor 2 | 3 | Docker executor can launch docker based cron jobs using the docker command of the target node. 4 | 5 | This executor needs a recent version of docker to be available and configured in the target node. 6 | 7 | ## Configuration 8 | 9 | To run a docker job create a job config with the docker executor as in this example: 10 | 11 | ```json 12 | { 13 | "executor": "docker", 14 | "executor_config": { 15 | "image": "alpine", //docker image to use 16 | "volumes": "/logs:/var/log/", //comma separated list of volume mappings 17 | "command": "echo \"Hello from dkron\"", //command to pass to run on container 18 | "env": "ENVIRONMENT=variable" //environment variables to pass to the container 19 | } 20 | } 21 | ``` 22 | -------------------------------------------------------------------------------- /website/docs/pro/failover.md: -------------------------------------------------------------------------------- 1 | # Cross region failover 2 | 3 | :::warning 4 | This feature is experimental and should be handled with care. 5 | ::: 6 | 7 | Dkron Pro can run federated in failover mode, this allows to have two clusters running in different regions and configure one of the clusters in an active-passive fashion, doing a failover in case the active cluster dies. 8 | -------------------------------------------------------------------------------- /website/docs/pro/processors/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Processors" 3 | } 4 | -------------------------------------------------------------------------------- /website/docs/pro/processors/email.md: -------------------------------------------------------------------------------- 1 | # Email processor 2 | 3 | The Email processor provides flexibility to job email notifications. 4 | 5 | Configuration of the email processor is stored in a file named `dkron-processor-email.yml` in the same locations as `dkron.yml`, and should include a list of providers, it can include any number of providers. 6 | 7 | Example: 8 | ```yaml 9 | provider1: 10 | host: smtp.myprovider.com 11 | port: 25 12 | username: myusername 13 | password: mypassword 14 | from: cron@mycompany.com 15 | subjectPrefix: '[Staging] ' 16 | ``` 17 | 18 | Then configure each job with the following options: 19 | 20 | Example: 21 | 22 | ```json 23 | { 24 | "processors": { 25 | "email": { 26 | "provider": "provider1", 27 | "emails": "team@mycompany.com, owner@mycompany.com", 28 | "onSuccess": "true" 29 | } 30 | } 31 | } 32 | ``` 33 | 34 | By default the email procesor doesn't send emails on job success, the `onSuccess` parameter, enables it, like in the previous example. 35 | -------------------------------------------------------------------------------- /website/docs/pro/processors/slack.md: -------------------------------------------------------------------------------- 1 | # Slack processor 2 | 3 | The Slack processor provides slack notifications with multiple configurations and rich format. 4 | 5 | Configuration of the slack processor is stored in a file named `dkron-processor-slack.yml` in the same locations as `dkron.yml`, and should include a list of teams, it can include any number of teams. 6 | 7 | ![](/img/slack.png) 8 | 9 | Example: 10 | ```yaml 11 | team1: 12 | webhook_url: https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXX 13 | bot_name: Dkron Production 14 | ``` 15 | 16 | Then configure each job with the following options: 17 | 18 | Example: 19 | 20 | ```json 21 | { 22 | "processors": { 23 | "slack": { 24 | "team": "team1", 25 | "channel": "#cron-production", 26 | "onSuccess": "true" 27 | } 28 | } 29 | } 30 | ``` 31 | 32 | By default the slack procesor doesn't send notifications on job success, the `onSuccess` parameter, enables it, like in the previous example. 33 | -------------------------------------------------------------------------------- /website/docs/upgrading/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Upgrading" 3 | } 4 | -------------------------------------------------------------------------------- /website/docs/upgrading/from_v2_0_to_v2_2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Upgrade from v2.0.x to v2.2.x 3 | --- 4 | 5 | ## Migrating Jobs 6 | 7 | To migrate jobs from v2.0.x to v2.2.x, export jobs from the v2.0.x cluster and import them into v2.2.x 8 | 9 | Refer to the [backup&restore upgrade guide](/docs/usage/upgrade#backup--restore) 10 | -------------------------------------------------------------------------------- /website/docs/usage/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Usage", 3 | "position": 2 4 | } 5 | -------------------------------------------------------------------------------- /website/docs/usage/chaining.md: -------------------------------------------------------------------------------- 1 | # Job chaining 2 | 3 | You can set some jobs to run after other job is executed. To setup a job that will be executed after any other given job, just set the `parent_job` property when saving the new job. 4 | 5 | The dependent job will be executed after the main job finished a successful execution. 6 | 7 | Child jobs schedule property will be ignored if it's present. 8 | 9 | Take into account that parent jobs must be created before any child job. 10 | 11 | Example: 12 | 13 | ```json 14 | { 15 | "name": "job1", 16 | "schedule": "@every 10s", 17 | "executor": "shell", 18 | "executor_config": { 19 | "command": "echo \"Hello from parent\"" 20 | } 21 | } 22 | 23 | { 24 | "name": "child_job", 25 | "parent_job": "job1", 26 | "executor": "shell", 27 | "executor_config": { 28 | "command": "echo \"Hello from child\"" 29 | } 30 | } 31 | ``` 32 | -------------------------------------------------------------------------------- /website/docs/usage/concurrency.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Concurrency 3 | toc: true 4 | --- 5 | 6 | ## Concurrency 7 | 8 | Jobs can be configured to allow overlapping executions or forbid them. 9 | 10 | Concurrency property accepts two option: 11 | 12 | * **allow** (default): Allow concurrent job executions. 13 | * **forbid**: If the job is already running don't send the execution, it will skip the executions until the next schedule. 14 | 15 | Example: 16 | 17 | ```json 18 | { 19 | "name": "job1", 20 | "schedule": "@every 10s", 21 | "executor": "shell", 22 | "executor_config": { 23 | "command": "echo \"Hello from parent\"" 24 | }, 25 | "concurrency": "forbid" 26 | } 27 | ``` 28 | -------------------------------------------------------------------------------- /website/docs/usage/ecs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Use with AWS ECS 3 | --- 4 | 5 | :::tip 6 | [Dkron Pro](/pro) comes with a [native ECS executor](/docs/pro/executors/ecs/) out of the box. 7 | ::: 8 | 9 | ## Use with Amazon ECS 10 | 11 | To use Dkron to schedule jobs that run in containers, a wrapper ECS script is needed. 12 | 13 | Install the following snippet in the node that will run the call to ECS 14 | 15 | <script src="https://gist.github.com/distribworks/3ac4aae9279d7c68c486fecccc2546cc.js"></script> 16 | 17 | ### Prerequisites 18 | 19 | The node that will run the call to ECS will need to have installed 20 | 21 | * AWS cli 22 | * jq 23 | 24 | ### Example 25 | 26 | `ecs-run --cluster cron --task-definition cron-taskdef --container-name cron --region us-east-1 --command "rake foo"` 27 | -------------------------------------------------------------------------------- /website/docs/usage/executors/gcp-pubsub.md: -------------------------------------------------------------------------------- 1 | # Google Cloud PubSub Executor 2 | 3 | A basic GC PubSub executor that produces a message on a Google Cloud PubSub topic. 4 | 5 | ## Configuration 6 | 7 | Params 8 | 9 | ``` 10 | project: Google Cloud project ID. Required 11 | topic: The topic name for the message. Required 12 | data: The actual message body in base64 format. Required 13 | attributes: The attributes of the message in JSON format. Optional 14 | ``` 15 | 16 | Example: 17 | 18 | ```json 19 | { 20 | "executor": "gcppubsub", 21 | "executor_config": { 22 | "project": "project-id", 23 | "topic": "topic-name", 24 | "data": "aGVsbG8gd29ybGQ=", 25 | "attributes": "{\"hello\":\"world\",\"waka\":\"paka\"}" 26 | } 27 | } 28 | ``` 29 | 30 | -------------------------------------------------------------------------------- /website/docs/usage/executors/grpc.md: -------------------------------------------------------------------------------- 1 | # GRPC Executor 2 | 3 | GRPC executor can send a request to a GRPC Server 4 | 5 | ## Requirements 6 | 7 | In order to serialize protobufs, the server needs to have the reflection service active. 8 | Without that we cannot get proto descriptors required for serialization. 9 | 10 | ## Configuration 11 | 12 | Params: 13 | 14 | ``` 15 | "url": Required, Request url 16 | "body": Optional, POST body 17 | "timeout": Optional, Request timeout, unit seconds 18 | "expectCode": Optional, One of https://grpc.github.io/grpc/core/md_doc_statuscodes.html 19 | ``` 20 | 21 | Example: 22 | 23 | ```json 24 | { 25 | "executor": "http", 26 | "executor_config": { 27 | "url": "127.0.0.1:9000/test.TestService/Test", 28 | "body": "{\"key\": \"value\"}", 29 | "timeout": "30", 30 | "expectCode": "0" 31 | } 32 | } 33 | ``` 34 | -------------------------------------------------------------------------------- /website/docs/usage/executors/nats.md: -------------------------------------------------------------------------------- 1 | # NATS Executor 2 | 3 | The NATS executor sends a message to a NATS server/cluster. 4 | 5 | Currently, only username/password authentication is supported. 6 | 7 | ## Configuration 8 | 9 | Params: 10 | 11 | ``` 12 | url: Comma separated list of NATS server URLs 13 | message: The message to send 14 | subject: The subject to send the message to 15 | userName: username for authentication 16 | password: password for authentication 17 | debug: If not empty, turns on debugging. Will log the NATS specific job config and the request sent. 18 | ``` 19 | 20 | Example: 21 | 22 | ```json 23 | { 24 | "executor": "nats", 25 | "executor_config": { 26 | "url": "tls://nats.demo.io:4443", 27 | "message": "the message", 28 | "subject": "myfavoritesubject", 29 | "userName": "someusername", 30 | "password": "somepassword" 31 | } 32 | } 33 | ``` 34 | -------------------------------------------------------------------------------- /website/docs/usage/metatags.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Job metadata 3 | --- 4 | 5 | ## Job metadata 6 | 7 | Jobs can have an optional extra property field called `metadata` that allows to set arbitrary tags to jobs and query the jobs using the API: 8 | 9 | ```json 10 | { 11 | "name": "job_name", 12 | "command": "/bin/true", 13 | "schedule": "@every 2m", 14 | "metadata": { 15 | "user_id": "12345" 16 | } 17 | } 18 | ``` 19 | 20 | And then query the API to get only the results needed: 21 | 22 | ``` 23 | $ curl http://localhost:8080/v1/jobs --data-urlencode "metadata[user_id]=12345"` 24 | ``` 25 | -------------------------------------------------------------------------------- /website/docs/usage/plugins/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Plugins" 3 | } 4 | -------------------------------------------------------------------------------- /website/docs/usage/plugins/index.md: -------------------------------------------------------------------------------- 1 | # Plugins 2 | 3 | ## Intro 4 | 5 | Plugins in Dkron allow you to add funcionality that integrates with the workflow of the job execution in Dkron. It's a powerful system that allows you to extend and adapt Dkron to your special needs. 6 | 7 | This page documents the basics of how the plugin system in Dkron works, and how to setup a basic development environment for plugin development if you're writing a Dkron plugin. 8 | 9 | ## How it Works 10 | 11 | Dkron execution execution processors are provided via plugins. Each plugin exposes functionality for modifying the execution. Plugins are executed as a separate process and communicate with the main Dkron binary over an RPC interface. 12 | 13 | The code within the binaries must adhere to certain interfaces. The network communication and RPC is handled automatically by higher-level libraries. The exact interface to implement is documented in its respective documentation section. 14 | 15 | ## Installing a Plugin 16 | 17 | Dkron searches for plugins at startup, to install a plugin just drop the binary in one of the following locations: 18 | 19 | 1. /etc/dkron/plugins 20 | 2. Dkron executable directory 21 | -------------------------------------------------------------------------------- /website/docs/usage/processors/file.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: File Processor 3 | --- 4 | 5 | File processor saves the execution output to a single log file in the specified directory 6 | 7 | ## Configuration 8 | 9 | Parameters 10 | 11 | ``` 12 | log_dir: Path to the location where the log files will be saved 13 | forward: Forward log output to the next processor 14 | ``` 15 | 16 | Example 17 | 18 | ```json 19 | { 20 | "name": "job_name", 21 | "command": "echo 'Hello files'", 22 | "schedule": "@every 2m", 23 | "tags": { 24 | "role": "web" 25 | }, 26 | "processors": { 27 | "files": { 28 | "log_dir": "/var/log/mydir", 29 | "forward": "true" 30 | } 31 | } 32 | } 33 | ``` 34 | -------------------------------------------------------------------------------- /website/docs/usage/processors/log.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Log Processor 3 | --- 4 | 5 | Log processor writes the execution output to stdout/stderr 6 | 7 | ## Configuration 8 | 9 | Parameters 10 | 11 | `forward: Forward the output to the next processor` 12 | 13 | Example 14 | 15 | ```json 16 | { 17 | "name": "job_name", 18 | "command": "echo 'Hello log'", 19 | "schedule": "@every 2m", 20 | "tags": { 21 | "role": "web" 22 | }, 23 | "processors": { 24 | "log": { 25 | "forward": "true" 26 | } 27 | } 28 | } 29 | ``` 30 | -------------------------------------------------------------------------------- /website/docs/usage/processors/syslog.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Syslog Processor 3 | --- 4 | 5 | Syslog processor writes the execution output to the system syslog daemon. 6 | 7 | Note: Only works on linux systems 8 | 9 | ## Configuration 10 | 11 | Parameters 12 | 13 | `forward: Forward the output to the next processor` 14 | 15 | Example 16 | 17 | ```json 18 | { 19 | "name": "job_name", 20 | "command": "echo 'Hello syslog'", 21 | "schedule": "@every 2m", 22 | "tags": { 23 | "role": "web" 24 | }, 25 | "processors": { 26 | "syslog": { 27 | "forward": "true" 28 | } 29 | } 30 | } 31 | ``` 32 | -------------------------------------------------------------------------------- /website/docs/usage/retries.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Job retries 3 | --- 4 | 5 | Jobs can be configured to retry in case of failure. 6 | 7 | ## Configuration 8 | 9 | ```json 10 | { 11 | "name": "job1", 12 | "schedule": "@every 10s", 13 | "executor": "shell", 14 | "executor_config": { 15 | "command": "echo \"Hello from parent\"" 16 | }, 17 | "retries": 5 18 | } 19 | ``` 20 | 21 | In case of failure to run the job in one node, it will try to run the job again in that node until the retries count reaches the limit. 22 | 23 | -------------------------------------------------------------------------------- /website/docs/usage/storage.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Embedded storage 3 | --- 4 | 5 | Dkron has an embedded distributed KV store engine based on BuntDB. This works out of the box on each dkron server. 6 | 7 | This ensures a dead easy install and setup, basically run dkron and you will have a full working node. 8 | -------------------------------------------------------------------------------- /website/docs/usage/upgrade.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Upgrade methods 3 | --- 4 | 5 | Use one of the following methods (depending on the changes) to upgrade a cluster to a newer version. 6 | 7 | ### Rolling upgrade 8 | 9 | Use the following procedure to rotate all cluster nodes, one server at a time: 10 | 11 | 1. Add a new server to the cluster with a configuration that joins them to the existing cluster. 12 | 1. Stop dkron service on one of the old servers, if it was the leader allow a new leader to be elected. Note that it is better to remove the current leader at the end, to ensure a leader is elected from the new nodes. 13 | 1. Use `dkron raft list-peers` to list current cluster nodes. 14 | 1. Use `dkron raft remove-peer` to forcefully remove the old server. 15 | 1. Repeat steps above until all old cluster nodes have been upgraded. 16 | 17 | ### Backup & Restore 18 | 19 | Use the `/restore` API endpoint to restore a previously exported jobs file 20 | 21 | ``` 22 | curl localhost:8080/v1/jobs > backup.json 23 | curl localhost:8080/v1/restore --form 'file=@backup.json' 24 | ``` 25 | 26 | This will restore all jobs and counters as they were in the export file. 27 | -------------------------------------------------------------------------------- /website/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | } 6 | } -------------------------------------------------------------------------------- /website/sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creating a sidebar enables you to: 3 | - create an ordered group of docs 4 | - render a sidebar for each doc of that group 5 | - provide next/previous navigation 6 | 7 | The sidebars can be generated from the filesystem, or explicitly defined here. 8 | 9 | Create as many sidebars as you want. 10 | */ 11 | 12 | // @ts-check 13 | 14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ 15 | const sidebars = { 16 | // By default, Docusaurus generates a sidebar from the docs folder structure 17 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], 18 | 19 | // But you can create a sidebar manually 20 | /* 21 | tutorialSidebar: [ 22 | { 23 | type: 'category', 24 | label: 'Tutorial', 25 | items: ['hello'], 26 | }, 27 | ], 28 | */ 29 | }; 30 | 31 | module.exports = sidebars; 32 | -------------------------------------------------------------------------------- /website/src/components/HomepageStats.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import CountUp from 'react-countup'; 3 | 4 | export default function HomepageStats() { 5 | return ( 6 | <section className="py-12 mt-16 bg-zinc-100"> 7 | <div className="px-4 mx-auto max-w-7xl sm:px-6 lg:px-8"> 8 | <h2 className="text-4xl font-bold text-fuchsia-700">Stats</h2> 9 | <div className="flex flex-row"> 10 | <div class="basis-1/2 "> 11 | <CountUp end={807} duration={5} useEasing={true} className="text-6xl font-bold" /> 12 | <h3>Clusters Running</h3> 13 | </div> 14 | <div class="basis-1/2"> 15 | <CountUp end={2536} duration={5} useEasing={true} className="text-6xl font-bold" /> 16 | <h3>Servers Running</h3> 17 | </div> 18 | </div> 19 | </div> 20 | </section> 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /website/src/pages/dkron_vs_other_software.md: -------------------------------------------------------------------------------- 1 | 2 | # Dkron vs. Other Software 3 | 4 | 5 | ## Dkron vs. Chronos 6 | 7 | Airbnb's Chronos is a job scheduler that is similar to dkron, it's distributed and fault tolerant thanks to the use of Zookeeper and Apache Mesos. 8 | 9 | If you don't have/want to run a Mesos cluster and deal with the not easy configuration and maintenance of Zookeeper and you want something lighter, Dkron could help you. 10 | 11 | ## Dkron vs. Rundeck 12 | 13 | Rundeck is a popular and mature platform to automate operations and schedule jobs. 14 | 15 | It has cool features: 16 | 17 | - Agentless 18 | - Permissions and auditing 19 | 20 | It's written in Java and it's not trivial to setup right. 21 | 22 | It uses a central database to store job execution results and configuration data, that makes it vulnerable to failures, and you need to take care of providing an HA environment for the database yourself, and that's not an easy task to do with Rundeck's supported databases. 23 | 24 | Dkron lacks some of its features but it's lightweight and fault-tolerant out-of-the-box. 25 | -------------------------------------------------------------------------------- /website/src/pages/index.module.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/src/pages/index.module.css -------------------------------------------------------------------------------- /website/src/pages/license.md: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | Copyright (c) Victor Castell 4 | 5 | Dkron is an Open Source project licensed under the terms of 6 | the LGPLv3 license. Please see http://www.gnu.org/licenses/lgpl-3.0.html 7 | for license text. 8 | -------------------------------------------------------------------------------- /website/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/.nojekyll -------------------------------------------------------------------------------- /website/static/CNAME: -------------------------------------------------------------------------------- 1 | dkron.io 2 | -------------------------------------------------------------------------------- /website/static/img/AXP_BlueBoxLogo_EXTRALARGEscale_RGB_DIGITAL_1600x1600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/AXP_BlueBoxLogo_EXTRALARGEscale_RGB_DIGITAL_1600x1600.png -------------------------------------------------------------------------------- /website/static/img/Allianz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/Allianz.png -------------------------------------------------------------------------------- /website/static/img/Blackstone_publishing_Logo_v2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/Blackstone_publishing_Logo_v2.png -------------------------------------------------------------------------------- /website/static/img/Flickr_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/Flickr_logo.png -------------------------------------------------------------------------------- /website/static/img/SoCal_Gas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/SoCal_Gas.png -------------------------------------------------------------------------------- /website/static/img/available.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/available.png -------------------------------------------------------------------------------- /website/static/img/benemen-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/benemen-logo.png -------------------------------------------------------------------------------- /website/static/img/book-keeping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/book-keeping.png -------------------------------------------------------------------------------- /website/static/img/cronitor1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/cronitor1.jpg -------------------------------------------------------------------------------- /website/static/img/cronitor2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/cronitor2.jpg -------------------------------------------------------------------------------- /website/static/img/data-consolidation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/data-consolidation.png -------------------------------------------------------------------------------- /website/static/img/data-transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/data-transfer.png -------------------------------------------------------------------------------- /website/static/img/dkron-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/dkron-black.png -------------------------------------------------------------------------------- /website/static/img/dkron-gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/dkron-gradient.png -------------------------------------------------------------------------------- /website/static/img/dkron-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/dkron-gray.png -------------------------------------------------------------------------------- /website/static/img/dkron-logo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/dkron-logo-black.png -------------------------------------------------------------------------------- /website/static/img/dkron-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/dkron-logo.png -------------------------------------------------------------------------------- /website/static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/docusaurus.png -------------------------------------------------------------------------------- /website/static/img/email-delivery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/email-delivery.png -------------------------------------------------------------------------------- /website/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/favicon.ico -------------------------------------------------------------------------------- /website/static/img/integration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/integration.png -------------------------------------------------------------------------------- /website/static/img/job-list-new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/job-list-new.png -------------------------------------------------------------------------------- /website/static/img/job-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/job-list.png -------------------------------------------------------------------------------- /website/static/img/jt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/jt-logo.png -------------------------------------------------------------------------------- /website/static/img/kata_ai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/kata_ai.png -------------------------------------------------------------------------------- /website/static/img/logo_linkfluence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/logo_linkfluence.png -------------------------------------------------------------------------------- /website/static/img/payroll-generation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/payroll-generation.png -------------------------------------------------------------------------------- /website/static/img/recurring-invoicing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/recurring-invoicing.png -------------------------------------------------------------------------------- /website/static/img/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/screenshot1.png -------------------------------------------------------------------------------- /website/static/img/sign-in.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/sign-in.jpg -------------------------------------------------------------------------------- /website/static/img/slack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/slack.png -------------------------------------------------------------------------------- /website/static/img/targets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/targets.png -------------------------------------------------------------------------------- /website/static/img/voiceworks-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/voiceworks-logo.png -------------------------------------------------------------------------------- /website/static/img/weta_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/distribworks/dkron/6778cfaae5b3bfcfbd93a0a74b16b4e8a39ca4b9/website/static/img/weta_logo.png -------------------------------------------------------------------------------- /website/static/js/linkedin.js: -------------------------------------------------------------------------------- 1 | _linkedin_partner_id = "8378297"; 2 | window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || []; 3 | window._linkedin_data_partner_ids.push(_linkedin_partner_id); 4 | (function(l) { 5 | if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])}; 6 | window.lintrk.q=[]} 7 | var s = document.getElementsByTagName("script")[0]; 8 | var b = document.createElement("script"); 9 | b.type = "text/javascript";b.async = true; 10 | b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js"; 11 | s.parentNode.insertBefore(b, s);})(window.lintrk); 12 | -------------------------------------------------------------------------------- /website/tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | content: ["./src/**/*.{html,js}"], 3 | corePlugins: { 4 | preflight: false, 5 | }, 6 | theme: { 7 | extend: {}, 8 | }, 9 | plugins: [], 10 | } -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/_footer.md: -------------------------------------------------------------------------------- 1 | [Distributed Works](http://www.distrib.works/) © 2015 - 2019 Victor Castell - victor@distrib.works 2 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/basics/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Basics" 3 | weight: 20 4 | icon: "<b>1. </b>" 5 | --- 6 | 7 | {{% children style="h2" depth="3" description="true" %}} 8 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/cli/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "CLI" 3 | weight: 90 4 | icon: "<b>1. </b>" 5 | --- 6 | 7 | {{% children style="h2" depth="3" description="true" %}} 8 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/cli/dkron.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-03-22 3 | title: "dkron" 4 | slug: dkron 5 | url: /v1.2/cli/dkron/ 6 | --- 7 | ## dkron 8 | 9 | Open source distributed job scheduling system 10 | 11 | ### Synopsis 12 | 13 | Dkron is a system service that runs scheduled jobs at given intervals or times, 14 | just like the cron unix service but distributed in several machines in a cluster. 15 | If a machine fails (the leader), a follower will take over and keep running the scheduled jobs without human intervention. 16 | 17 | ### Options 18 | 19 | ``` 20 | --config string config file path 21 | -h, --help help for dkron 22 | ``` 23 | 24 | ### SEE ALSO 25 | 26 | * [dkron agent](/docs/v1/cli/dkron_agent/) - Start a dkron agent 27 | * [dkron doc](/docs/v1/cli/dkron_doc/) - Generate Markdown documentation for the Dkron CLI. 28 | * [dkron keygen](/docs/v1/cli/dkron_keygen/) - Generates a new encryption key 29 | * [dkron leave](/docs/v1/cli/dkron_leave/) - Force an agent to leave the cluster 30 | * [dkron version](/docs/v1/cli/dkron_version/) - Show version 31 | 32 | ###### Auto generated by spf13/cobra on 22-Mar-2019 33 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/cli/dkron_doc.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-03-22 3 | title: "dkron doc" 4 | slug: dkron_doc 5 | url: /v1.2/cli/dkron_doc/ 6 | --- 7 | ## dkron doc 8 | 9 | Generate Markdown documentation for the Dkron CLI. 10 | 11 | ### Synopsis 12 | 13 | Generate Markdown documentation for the Dkron CLI. 14 | This command is, mostly, used to create up-to-date documentation 15 | of Dkron's command-line interface for http://dkron.io/. 16 | It creates one Markdown file per command with front matter suitable 17 | for rendering in Hugo. 18 | 19 | ``` 20 | dkron doc [flags] 21 | ``` 22 | 23 | ### Options 24 | 25 | ``` 26 | --dir string the directory to write the doc. (default "/tmp/dkrondoc/") 27 | -h, --help help for doc 28 | ``` 29 | 30 | ### Options inherited from parent commands 31 | 32 | ``` 33 | --config string config file path 34 | ``` 35 | 36 | ### SEE ALSO 37 | 38 | * [dkron](/docs/v1/cli/dkron/) - Open source distributed job scheduling system 39 | 40 | ###### Auto generated by spf13/cobra on 22-Mar-2019 41 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/cli/dkron_keygen.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-03-22 3 | title: "dkron keygen" 4 | slug: dkron_keygen 5 | url: /v1.2/cli/dkron_keygen/ 6 | --- 7 | ## dkron keygen 8 | 9 | Generates a new encryption key 10 | 11 | ### Synopsis 12 | 13 | Generates a new encryption key that can be used to configure the 14 | agent to encrypt traffic. The output of this command is already 15 | in the proper format that the agent expects. 16 | 17 | ``` 18 | dkron keygen [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for keygen 25 | ``` 26 | 27 | ### Options inherited from parent commands 28 | 29 | ``` 30 | --config string config file path 31 | ``` 32 | 33 | ### SEE ALSO 34 | 35 | * [dkron](/docs/v1/cli/dkron/) - Open source distributed job scheduling system 36 | 37 | ###### Auto generated by spf13/cobra on 22-Mar-2019 38 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/cli/dkron_leave.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-03-22 3 | title: "dkron leave" 4 | slug: dkron_leave 5 | url: /v1.2/cli/dkron_leave/ 6 | --- 7 | ## dkron leave 8 | 9 | Force an agent to leave the cluster 10 | 11 | ### Synopsis 12 | 13 | Stop stops an agent, if the agent is a server and is running for election 14 | stop running for election, if this server was the leader 15 | this will force the cluster to elect a new leader and start a new scheduler. 16 | If this is a server and has the scheduler started stop it, ignoring if this server 17 | was participating in leader election or not (local storage). 18 | Then actually leave the cluster. 19 | 20 | ``` 21 | dkron leave [flags] 22 | ``` 23 | 24 | ### Options 25 | 26 | ``` 27 | -h, --help help for leave 28 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 29 | ``` 30 | 31 | ### Options inherited from parent commands 32 | 33 | ``` 34 | --config string config file path 35 | ``` 36 | 37 | ### SEE ALSO 38 | 39 | * [dkron](/docs/v1/cli/dkron/) - Open source distributed job scheduling system 40 | 41 | ###### Auto generated by spf13/cobra on 22-Mar-2019 42 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/cli/dkron_version.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-03-22 3 | title: "dkron version" 4 | slug: dkron_version 5 | url: /v1.2/cli/dkron_version/ 6 | --- 7 | ## dkron version 8 | 9 | Show version 10 | 11 | ### Synopsis 12 | 13 | Show the version 14 | 15 | ``` 16 | dkron version [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for version 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file path 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [dkron](/docs/v1/cli/dkron/) - Open source distributed job scheduling system 34 | 35 | ###### Auto generated by spf13/cobra on 22-Mar-2019 36 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/intro/dkron_vs_other_software.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dkron vs. Other Software 3 | wight: 5 4 | toc: false 5 | --- 6 | 7 | ## Dkron vs. Chronos 8 | 9 | Airbnb's Chronos is a job scheduler that is similar to dkron, it's distributed and fault tolerant thanks to the use of Zookeeper and Apache Mesos. 10 | 11 | If you don't have/want to run a Mesos cluster and deal with the not easy configuration and maintenance of Zookeeper and you want something lighter, Dkron could help you. 12 | 13 | ## Dkron vs. Rundeck 14 | 15 | Rundeck is a popular and mature platform to automate operations and schedule jobs. 16 | 17 | It has cool features: 18 | 19 | - Agentless 20 | - Permissions and auditing 21 | 22 | It's written in Java and it's not trivial to setup right. 23 | 24 | It uses a central database to store job execution results and configuration data, that makes it vulnerable to failures, and you need to take care of providing an HA environment for the database yourself, and that's not an easy task to do with Rundeck's supported databases. 25 | 26 | Dkron lacks some of its features but it's lightweight and fault-tolerant out-of-the-box. 27 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/intro/license.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: License 3 | wight: 6 4 | toc: false 5 | --- 6 | 7 | Copyright (c) Victor Castell 8 | 9 | Dkron is an Open Source project licensed under the terms of 10 | the LGPLv3 license. Please see http://www.gnu.org/licenses/lgpl-3.0.html 11 | for license text. 12 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dkron Pro 3 | weight: 40 4 | --- 5 | 6 | {{% children style="h3" description="true" %}} 7 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/auth.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Authorization 3 | --- 4 | 5 | Dkron Pro has the ability to be configured to use HTTP basic auth. 6 | 7 | Authentication can be set using these parameters in the dkron config file: 8 | 9 | ```yaml 10 | # dkron.yml 11 | username: dkron_admin 12 | password: adminpassword 13 | ``` 14 | 15 | This will enable auth on the WebUI and for the API. 16 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/cli/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Pro CLI" 3 | weight: 90 4 | icon: "<b>1. </b>" 5 | --- 6 | 7 | {{% children style="h2" depth="3" description="true" %}} 8 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/cli/dkron.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-01-21 3 | title: "dkron" 4 | slug: dkron 5 | url: /v1.2/cli/dkron/ 6 | --- 7 | ## dkron 8 | 9 | Professional distributed job scheduling system 10 | 11 | ### Synopsis 12 | 13 | Dkron is a system service that runs scheduled jobs at given intervals or times, 14 | just like the cron unix service but distributed in several machines in a cluster. 15 | If a machine fails (the leader), a follower will take over and keep running the scheduled jobs without human intervention. 16 | 17 | ### Options 18 | 19 | ``` 20 | --config string config file (default is /etc/dkron/dkron.yml) 21 | -h, --help help for dkron 22 | ``` 23 | 24 | ### SEE ALSO 25 | 26 | * [dkron agent](/docs/v1/cli/dkron_agent/) - Start a dkron agent 27 | * [dkron doc](/docs/v1/cli/dkron_doc/) - Generate Markdown documentation for the Dkron CLI. 28 | * [dkron keygen](/docs/v1/cli/dkron_keygen/) - Generates a new encryption key 29 | * [dkron version](/docs/v1/cli/dkron_version/) - Show version 30 | 31 | ###### Auto generated by spf13/cobra on 21-Jan-2019 32 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/cli/dkron_doc.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-01-21 3 | title: "dkron doc" 4 | slug: dkron_doc 5 | url: /v1.2/cli/dkron_doc/ 6 | --- 7 | ## dkron doc 8 | 9 | Generate Markdown documentation for the Dkron CLI. 10 | 11 | ### Synopsis 12 | 13 | Generate Markdown documentation for the Dkron CLI. 14 | This command is, mostly, used to create up-to-date documentation 15 | of Dkron's command-line interface for http://dkron.io/. 16 | It creates one Markdown file per command with front matter suitable 17 | for rendering in Hugo. 18 | 19 | ``` 20 | dkron doc [flags] 21 | ``` 22 | 23 | ### Options 24 | 25 | ``` 26 | --dir string the directory to write the doc. (default "/tmp/dkrondoc/") 27 | -h, --help help for doc 28 | ``` 29 | 30 | ### Options inherited from parent commands 31 | 32 | ``` 33 | --config string config file (default is /etc/dkron/dkron.yml) 34 | ``` 35 | 36 | ### SEE ALSO 37 | 38 | * [dkron](/docs/v1/cli/dkron/) - Professional distributed job scheduling system 39 | 40 | ###### Auto generated by spf13/cobra on 21-Jan-2019 41 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/cli/dkron_keygen.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-01-21 3 | title: "dkron keygen" 4 | slug: dkron_keygen 5 | url: /v1.2/cli/dkron_keygen/ 6 | --- 7 | ## dkron keygen 8 | 9 | Generates a new encryption key 10 | 11 | ### Synopsis 12 | 13 | Generates a new encryption key that can be used to configure the 14 | agent to encrypt traffic. The output of this command is already 15 | in the proper format that the agent expects. 16 | 17 | ``` 18 | dkron keygen [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for keygen 25 | ``` 26 | 27 | ### Options inherited from parent commands 28 | 29 | ``` 30 | --config string config file (default is /etc/dkron/dkron.yml) 31 | ``` 32 | 33 | ### SEE ALSO 34 | 35 | * [dkron](/docs/v1/cli/dkron/) - Professional distributed job scheduling system 36 | 37 | ###### Auto generated by spf13/cobra on 21-Jan-2019 38 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/cli/dkron_version.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-01-21 3 | title: "dkron version" 4 | slug: dkron_version 5 | url: /v1.2/cli/dkron_version/ 6 | --- 7 | ## dkron version 8 | 9 | Show version 10 | 11 | ### Synopsis 12 | 13 | Show the version 14 | 15 | ``` 16 | dkron version [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for version 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file (default is /etc/dkron/dkron.yml) 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [dkron](/docs/v1/cli/dkron/) - Professional distributed job scheduling system 34 | 35 | ###### Auto generated by spf13/cobra on 21-Jan-2019 36 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/clustering.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Clustering 3 | --- 4 | 5 | ## Configure a cluster 6 | 7 | First follow the Dkron [clustering guide](/docs/usage/clustering) then you can continue with this guide. 8 | 9 | The embedded store also needs to know its peers, it needs its own configuration as in the following example: 10 | 11 | ```yaml 12 | # etcd.conf.yaml 13 | # Initial cluster configuration for bootstrapping. 14 | initial-cluster: dkron1=https://10.19.3.9:2380,dkron2=https://10.19.4.64:2380,dkron3=https://10.19.7.215:2380 15 | ``` 16 | 17 | With this configuration Dkron Pro should start in cluster mode with embedded storage. 18 | 19 | For a more in detail guide of clustering with etcd follow this guide: https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/clustering.md 20 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/commercial-support.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Commercial Support 3 | --- 4 | 5 | Dkron offers only community support. Dkro Pro offers priority support via email. 6 | 7 | ## Priority Support 8 | 9 | Covers 1 incident per quarter, with a max response time of 2 working days. Scope is limited to Dkron and Dkron Pro features and APIs, not the application or infrastructure. For support, email support AT distrib.works. Please email using the same domain as the original license email or explain your connection to the licensed company. 10 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/configuration.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | title: Configuration 4 | --- 5 | 6 | ## Configuration 7 | 8 | Dkron Pro uses the [same parameters](/docs/v1/basics/configuration) as Dkron OSS and add some extra parameters. 9 | 10 | ### Command line options 11 | 12 | * `--etcd-config-file-path` - Etcd node config 13 | * `--username` - Authentication username 14 | * `--password` - Authentication password 15 | * `--cert-file` - Path to the client server TLS cert file 16 | * `--key-file` - Path to the client server TLS key file 17 | * `--client-crl-file` - Path to the client certificate revocation list file 18 | * `--trusted-ca-file` - Path to the client server TLS trusted CA cert file 19 | * `--client-cert-auth` - Enable client cert authentication 20 | * `--auto-tls` - Client TLS using generated certificates 21 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/executors/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Executors 3 | --- 4 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/executors/docker.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Docker executor 3 | --- 4 | 5 | Docker executor can launch docker based cron jobs using the docker command of the target node. 6 | 7 | This executor needs a recent version of docker to be available and configured in the target node. 8 | 9 | ## Configuration 10 | 11 | To run a docker job create a job config with the docker executor as in this example: 12 | 13 | ```json 14 | { 15 | "executor": "docker", 16 | "executor_config": { 17 | "image": "alpine", //docker image to use 18 | "volumes": "/logs:/var/log/", //comma separated list of volume mappings 19 | "command": "echo \"Hello from dkron\"", //command to pass to run on container 20 | "env": "ENVIRONMENT=variable" //environment variables to pass to the container 21 | } 22 | } 23 | ``` 24 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/processors/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Processors 3 | --- 4 | 5 | {{% children style="h3" description="true" %}} 6 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/processors/elasticsearch.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Elasticsearch processor 3 | --- 4 | 5 | The Elasticsearch processor can fordward execution logs to an ES cluster. It need an already available Elasticsearch installation that is visible in the same network of the target node. 6 | 7 | The output logs of the job execution will be stored in the indicated ES instace. 8 | 9 | ## Configuration 10 | 11 | ```json 12 | { 13 | "processors": { 14 | "elasticsearch": { 15 | "url": "http://localhost:9200", //comma separated list of Elasticsearch hosts urls (default: http://localhost:9200) 16 | "index": "dkron_logs", //desired index name (default: dkron_logs) 17 | "forward": "false" //forward logs to the next processor (default: false) 18 | } 19 | } 20 | } 21 | ``` 22 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/processors/email.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Email processor 3 | --- 4 | 5 | The Email processor provides flexibility to job email notifications. 6 | 7 | Configuration of the email processor is stored in a file named `dkron-processor-email.yml` in the same locations as `dkron.yml`, and should include a list of providers, it can include any number of providers. 8 | 9 | Example: 10 | ```yaml 11 | provider1: 12 | host: smtp.myprovider.com 13 | port: 25 14 | username: myusername 15 | password: mypassword 16 | from: cron@mycompany.com 17 | subjectPrefix: '[Staging] ' 18 | ``` 19 | 20 | Then configure each job with the following options: 21 | 22 | Example: 23 | 24 | ```json 25 | { 26 | "processors": { 27 | "email": { 28 | "provider": "provider1", 29 | "emails": "team@mycompany.com, owner@mycompany.com", 30 | "onSuccess": true 31 | } 32 | } 33 | } 34 | ``` 35 | 36 | By default the email procesor doesn't send emails on job success, the `onSuccess` parameter, enables it, like in the previous example. 37 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/processors/slack.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Slack processor 3 | --- 4 | 5 | The Slack processor provides slack notifications with multiple configurations and rich format. 6 | 7 | Configuration of the slack processor is stored in a file named `dkron-processor-slack.yml` in the same locations as `dkron.yml`, and should include a list of teams, it can include any number of teams. 8 | 9 | ![](/img/slack.png) 10 | 11 | Example: 12 | ```yaml 13 | team1: 14 | webhook_url: https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXX 15 | bot_name: Dkron Production 16 | ``` 17 | 18 | Then configure each job with the following options: 19 | 20 | Example: 21 | 22 | ```json 23 | { 24 | "processors": { 25 | "slack": { 26 | "team": "team1", 27 | "channel": "#cron-production", 28 | "onSuccess": true 29 | } 30 | } 31 | } 32 | ``` 33 | 34 | By default the slack procesor doesn't send notifications on job success, the `onSuccess` parameter, enables it, like in the previous example. 35 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/pro/storage.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Embedded storage 3 | --- 4 | 5 | Dkron Pro has an embedded distributed KV store engine based on etcd. This works out of the box on each node dkron server is started. 6 | 7 | This ensures a dead easy install and setup, basically run dkron and you will have a full working node and at the same time provides you with a fully tested well supported store for its use with dkron. 8 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Usage" 3 | weight: 30 4 | --- 5 | 6 | {{% children style="card" depth="2" description="true" %}} 7 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/chaining.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Job chaining 3 | --- 4 | 5 | ## Job chaining 6 | 7 | You can set some jobs to run after other job is executed. To setup a job that will be executed after any other given job, just set the `parent_job` property when saving the new job. 8 | 9 | The dependent job will be executed after the main job finished a successful execution. 10 | 11 | Child jobs schedule property will be ignored if it's present. 12 | 13 | Take into account that parent jobs must be created before any child job. 14 | 15 | Example: 16 | 17 | ```json 18 | { 19 | "name": "job1", 20 | "schedule": "@every 10s", 21 | "executor": "shell", 22 | "executor_config": { 23 | "command": "echo \"Hello from parent\"" 24 | } 25 | } 26 | 27 | { 28 | "name": "child_job", 29 | "parent_job": "job1", 30 | "executor": "shell", 31 | "executor_config": { 32 | "command": "echo \"Hello from child\"" 33 | } 34 | } 35 | ``` 36 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/clustering.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Clustering 3 | --- 4 | 5 | ## Configure a cluster 6 | 7 | Dkron can run in HA mode, avoiding SPOFs, this mode provides better scalability and better reliability for users that wants a high level of confidence in the cron jobs they need to run. 8 | 9 | To form a cluster, server nodes need to know the address of its peers as in the following example: 10 | 11 | ```yaml 12 | # dkron.yml 13 | join: 14 | - 10.19.3.9 15 | - 10.19.4.64 16 | - 10.19.7.215 17 | ``` 18 | 19 | ### Etcd 20 | 21 | For a more in detail guide of clustering with etcd follow this guide: https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/clustering.md 22 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/concurrency.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Concurrency 3 | toc: true 4 | --- 5 | 6 | ## Concurrency 7 | 8 | Jobs can be configured to allow overlapping executions or forbid them. 9 | 10 | Concurrency property accepts two option: 11 | 12 | * **allow** (default): Allow concurrent job executions. 13 | * **forbid**: If the job is already running don't send the execution, it will skip the executions until the next schedule. 14 | 15 | Example: 16 | 17 | ```json 18 | { 19 | "name": "job1", 20 | "schedule": "@every 10s", 21 | "executor": "shell", 22 | "executor_config": { 23 | "command": "echo \"Hello from parent\"" 24 | }, 25 | "concurrency": "forbid" 26 | } 27 | ``` 28 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/ecs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Use with AWS ECS 3 | --- 4 | 5 | :::note 6 | [Dkron Pro](/pro) comes with a [native ECS executor](/docs/v1/pro/executors/ecs) out of the box. 7 | ::: 8 | 9 | ## Use with Amazon ECS 10 | 11 | To use Dkron to schedule jobs that run in containers, a wrapper ECS script is needed. 12 | 13 | Install the following snippet in the node that will run the call to ECS 14 | 15 | <script src="https://gist.github.com/distribworks/3ac4aae9279d7c68c486fecccc2546cc.js"></script> 16 | 17 | ### Prerequisites 18 | 19 | The node that will run the call to ECS will need to have installed 20 | 21 | * AWS cli 22 | * jq 23 | 24 | ### Example 25 | 26 | `ecs-run --cluster cron --task-definition cron-taskdef --container-name cron --region us-east-1 --command "rake foo"` 27 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/executors/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Executors 3 | weight: 30 4 | --- 5 | 6 | ## Executors 7 | 8 | Executors plugins are the main mechanism of execution in Dkron. They implement different "types" of jobs in the sense that they can perform the most diverse actions on the target nodes. 9 | 10 | For example, the built-in `shell` executor, will run the indicated command in the target node. 11 | 12 | New plugins will be added, or you can create new ones, to perform different tasks, as HTTP requests, Docker runs, anything that you can imagine. 13 | 14 | [Dkron Pro](/pro/) have commercially supported executors 15 | 16 | {{% children %}} 17 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/executors/http.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: HTTP Executor 3 | --- 4 | 5 | HTTP executor can send a request to an HTTP endpoint 6 | 7 | ## Configuration 8 | 9 | Params: 10 | 11 | ``` 12 | method: Request method in uppercase 13 | url: Request url 14 | headers: Json string, such as "[\"Content-Type: application/json\"]" 15 | body: POST body 16 | timeout: Request timeout, unit seconds 17 | expectCode: Expect response code, such as 200,206 18 | expectBody: Expect response body, support regexp, such as /success/ 19 | debug: Debug option, will log everything when this option is not empty 20 | ``` 21 | 22 | Example 23 | 24 | ```json 25 | { 26 | "executor": "http", 27 | "executor_config": { 28 | "method": "GET", 29 | "url": "http://example.com", 30 | "headers": "[]", 31 | "body": "", 32 | "timeout": "30", 33 | "expectCode": "200", 34 | "expectBody": "", 35 | "debug": "true" 36 | } 37 | } 38 | ``` 39 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/executors/shell.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | title: Shell Executor 4 | --- 5 | 6 | Shell executor runs a system command 7 | 8 | ## Configuration 9 | 10 | Params 11 | 12 | ``` 13 | shell: Run this command using a shell environment 14 | command: The command to run 15 | env: Env vars separated by comma 16 | cwd: Chdir before command run 17 | ``` 18 | 19 | Example 20 | 21 | ```json 22 | { 23 | "executor": "shell", 24 | "executor_config": { 25 | "shell": "true", 26 | "command": "my_command", 27 | "env": "ENV_VAR=va1,ANOTHER_ENV_VAR=var2", 28 | "cwd": "/app" 29 | } 30 | } 31 | ``` 32 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/processors/file.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: File Processor 3 | --- 4 | 5 | File processor saves the execution output to a single log file in the specified directory 6 | 7 | ## Configuration 8 | 9 | Parameters 10 | 11 | ``` 12 | log_dir: Path to the location where the log files will be saved 13 | forward: Forward log output to the next processor 14 | ``` 15 | 16 | Example 17 | 18 | ```json 19 | { 20 | "name": "job_name", 21 | "command": "echo 'Hello files'", 22 | "schedule": "@every 2m", 23 | "tags": { 24 | "role": "web" 25 | }, 26 | "processors": { 27 | "files": { 28 | "log_dir": "/var/log/mydir", 29 | "forward": true 30 | } 31 | } 32 | } 33 | ``` 34 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/processors/log.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Log Processor 3 | --- 4 | 5 | Log processor writes the execution output to stdout/stderr 6 | 7 | ## Configuration 8 | 9 | Parameters 10 | 11 | `forward: Forward the output to the next processor` 12 | 13 | Example 14 | 15 | ```json 16 | { 17 | "name": "job_name", 18 | "command": "echo 'Hello log'", 19 | "schedule": "@every 2m", 20 | "tags": { 21 | "role": "web" 22 | }, 23 | "processors": { 24 | "log": { 25 | "forward": true 26 | } 27 | } 28 | } 29 | ``` 30 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/processors/syslog.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Syslog Processor 3 | --- 4 | 5 | Syslog processor writes the execution output to the system syslog daemon 6 | 7 | Note: Only work on linux systems 8 | 9 | ## Configuration 10 | 11 | Parameters 12 | 13 | `forward: Forward the output to the next processor` 14 | 15 | Example 16 | 17 | ```json 18 | { 19 | "name": "job_name", 20 | "command": "echo 'Hello syslog'", 21 | "schedule": "@every 2m", 22 | "tags": { 23 | "role": "web" 24 | }, 25 | "processors": { 26 | "syslog": { 27 | "forward": true 28 | } 29 | } 30 | } 31 | ``` 32 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v1/usage/retries.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Job retries 3 | --- 4 | 5 | Jobs can be configured to retry in case of failure. 6 | 7 | ## Configuration 8 | 9 | ```json 10 | { 11 | "name": "job1", 12 | "schedule": "@every 10s", 13 | "executor": "shell", 14 | "executor_config": { 15 | "command": "echo \"Hello from parent\"" 16 | }, 17 | "retries": 5 18 | } 19 | ``` 20 | 21 | In case of failure to run the job in one node, it will try to run the job again in that node until the retries count reaches the limit. 22 | 23 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/_footer.md: -------------------------------------------------------------------------------- 1 | [Distributed Works](http://www.distrib.works/) © 2015 - 2020 Victor Castell - victor@distrib.works 2 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/basics/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Basics" 3 | weight: 20 4 | icon: "<b>1. </b>" 5 | --- 6 | 7 | {{% children style="h2" depth="3" description="true" %}} 8 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/cli/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "CLI" 3 | weight: 90 4 | icon: "<b>1. </b>" 5 | --- 6 | 7 | {{% children style="h2" depth="3" description="true" %}} 8 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/cli/dkron_doc.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-10-10 3 | title: "dkron doc" 4 | slug: dkron_doc 5 | url: /v2.0/cli/dkron_doc/ 6 | --- 7 | ## dkron doc 8 | 9 | Generate Markdown documentation for the Dkron CLI. 10 | 11 | ### Synopsis 12 | 13 | Generate Markdown documentation for the Dkron CLI. 14 | This command is, mostly, used to create up-to-date documentation 15 | of Dkron's command-line interface for http://dkron.io/. 16 | It creates one Markdown file per command with front matter suitable 17 | for rendering in Hugo. 18 | 19 | ``` 20 | dkron doc [flags] 21 | ``` 22 | 23 | ### Options 24 | 25 | ``` 26 | --dir string the directory to write the doc. (default "/tmp/dkrondoc/") 27 | -h, --help help for doc 28 | ``` 29 | 30 | ### Options inherited from parent commands 31 | 32 | ``` 33 | --config string config file path 34 | ``` 35 | 36 | ### SEE ALSO 37 | 38 | * [dkron](/docs/v2/cli/dkron/) - Open source distributed job scheduling system 39 | 40 | ###### Auto generated by spf13/cobra on 10-Oct-2019 41 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/cli/dkron_keygen.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-10-10 3 | title: "dkron keygen" 4 | slug: dkron_keygen 5 | url: /v2.0/cli/dkron_keygen/ 6 | --- 7 | ## dkron keygen 8 | 9 | Generates a new encryption key 10 | 11 | ### Synopsis 12 | 13 | Generates a new encryption key that can be used to configure the 14 | agent to encrypt traffic. The output of this command is already 15 | in the proper format that the agent expects. 16 | 17 | ``` 18 | dkron keygen [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for keygen 25 | ``` 26 | 27 | ### Options inherited from parent commands 28 | 29 | ``` 30 | --config string config file path 31 | ``` 32 | 33 | ### SEE ALSO 34 | 35 | * [dkron](/docs/v2/cli/dkron/) - Open source distributed job scheduling system 36 | 37 | ###### Auto generated by spf13/cobra on 10-Oct-2019 38 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/cli/dkron_leave.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-10-10 3 | title: "dkron leave" 4 | slug: dkron_leave 5 | url: /v2.0/cli/dkron_leave/ 6 | --- 7 | ## dkron leave 8 | 9 | Force an agent to leave the cluster 10 | 11 | ### Synopsis 12 | 13 | Stop stops an agent, if the agent is a server and is running for election 14 | stop running for election, if this server was the leader 15 | this will force the cluster to elect a new leader and start a new scheduler. 16 | 17 | ``` 18 | dkron leave [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for leave 25 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 26 | ``` 27 | 28 | ### Options inherited from parent commands 29 | 30 | ``` 31 | --config string config file path 32 | ``` 33 | 34 | ### SEE ALSO 35 | 36 | * [dkron](/docs/v2/cli/dkron/) - Open source distributed job scheduling system 37 | 38 | ###### Auto generated by spf13/cobra on 10-Oct-2019 39 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/cli/dkron_raft.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-10-10 3 | title: "dkron raft" 4 | slug: dkron_raft 5 | url: /v2.0/cli/dkron_raft/ 6 | --- 7 | ## dkron raft 8 | 9 | Command to perform some raft operations 10 | 11 | ### Synopsis 12 | 13 | Command to perform some raft operations 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for raft 19 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 20 | ``` 21 | 22 | ### Options inherited from parent commands 23 | 24 | ``` 25 | --config string config file path 26 | ``` 27 | 28 | ### SEE ALSO 29 | 30 | * [dkron](/docs/v2/cli/dkron/) - Open source distributed job scheduling system 31 | * [dkron raft list-peers](/docs/v2/cli/dkron_raft_list-peers/) - Command to list raft peers 32 | * [dkron raft remove-peer](/docs/v2/cli/dkron_raft_remove-peer/) - Command to list raft peers 33 | 34 | ###### Auto generated by spf13/cobra on 10-Oct-2019 35 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/cli/dkron_raft_list-peers.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-10-10 3 | title: "dkron raft list-peers" 4 | slug: dkron_raft_list-peers 5 | url: /v2.0/cli/dkron_raft_list-peers/ 6 | --- 7 | ## dkron raft list-peers 8 | 9 | Command to list raft peers 10 | 11 | ### Synopsis 12 | 13 | Command to list raft peers 14 | 15 | ``` 16 | dkron raft list-peers [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for list-peers 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file path 29 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 30 | ``` 31 | 32 | ### SEE ALSO 33 | 34 | * [dkron raft](/docs/v2/cli/dkron_raft/) - Command to perform some raft operations 35 | 36 | ###### Auto generated by spf13/cobra on 10-Oct-2019 37 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/cli/dkron_raft_remove-peer.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-10-10 3 | title: "dkron raft remove-peer" 4 | slug: dkron_raft_remove-peer 5 | url: /v2.0/cli/dkron_raft_remove-peer/ 6 | --- 7 | ## dkron raft remove-peer 8 | 9 | Command to list raft peers 10 | 11 | ### Synopsis 12 | 13 | Command to list raft peers 14 | 15 | ``` 16 | dkron raft remove-peer [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for remove-peer 23 | --peer-id string Remove a Dkron server with the given ID from the Raft configuration. 24 | ``` 25 | 26 | ### Options inherited from parent commands 27 | 28 | ``` 29 | --config string config file path 30 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 31 | ``` 32 | 33 | ### SEE ALSO 34 | 35 | * [dkron raft](/docs/v2/cli/dkron_raft/) - Command to perform some raft operations 36 | 37 | ###### Auto generated by spf13/cobra on 10-Oct-2019 38 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/cli/dkron_version.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-10-10 3 | title: "dkron version" 4 | slug: dkron_version 5 | url: /v2.0/cli/dkron_version/ 6 | --- 7 | ## dkron version 8 | 9 | Show version 10 | 11 | ### Synopsis 12 | 13 | Show the version 14 | 15 | ``` 16 | dkron version [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for version 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file path 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [dkron](/docs/v2/cli/dkron/) - Open source distributed job scheduling system 34 | 35 | ###### Auto generated by spf13/cobra on 10-Oct-2019 36 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/intro/dkron_vs_other_software.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dkron vs. Other Software 3 | wight: 5 4 | toc: false 5 | --- 6 | 7 | ## Dkron vs. Chronos 8 | 9 | Airbnb's Chronos is a job scheduler that is similar to dkron, it's distributed and fault tolerant thanks to the use of Zookeeper and Apache Mesos. 10 | 11 | If you don't have/want to run a Mesos cluster and deal with the not easy configuration and maintenance of Zookeeper and you want something lighter, Dkron could help you. 12 | 13 | ## Dkron vs. Rundeck 14 | 15 | Rundeck is a popular and mature platform to automate operations and schedule jobs. 16 | 17 | It has cool features: 18 | 19 | - Agentless 20 | - Permissions and auditing 21 | 22 | It's written in Java and it's not trivial to setup right. 23 | 24 | It uses a central database to store job execution results and configuration data, that makes it vulnerable to failures, and you need to take care of providing an HA environment for the database yourself, and that's not an easy task to do with Rundeck's supported databases. 25 | 26 | Dkron lacks some of its features but it's lightweight and fault-tolerant out-of-the-box. 27 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/intro/license.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: License 3 | wight: 6 4 | toc: false 5 | --- 6 | 7 | Copyright (c) Victor Castell 8 | 9 | Dkron is an Open Source project licensed under the terms of 10 | the LGPLv3 license. Please see http://www.gnu.org/licenses/lgpl-3.0.html 11 | for license text. 12 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dkron Pro 3 | weight: 40 4 | --- 5 | 6 | {{% children style="li" depth="999" %}} 7 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/auth.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Authentication 3 | --- 4 | 5 | Dkron Pro has the ability to be configured to use HTTP basic auth. 6 | 7 | Authentication can be set using these parameters in the dkron config file: 8 | 9 | ```yaml 10 | # dkron.yml 11 | username: dkron_admin 12 | password: adminpassword 13 | ``` 14 | 15 | This will enable auth on the WebUI and for the API. 16 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/cli/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Pro CLI" 3 | weight: 90 4 | icon: "<b>1. </b>" 5 | --- 6 | 7 | {{% children style="h2" depth="3" description="true" %}} 8 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/cli/dkron_doc.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-08-26 3 | title: "dkron doc" 4 | slug: dkron_doc 5 | url: /2.0/pro/cli/dkron_doc/ 6 | --- 7 | ## dkron doc 8 | 9 | Generate Markdown documentation for the Dkron CLI. 10 | 11 | ### Synopsis 12 | 13 | Generate Markdown documentation for the Dkron CLI. 14 | This command is, mostly, used to create up-to-date documentation 15 | of Dkron's command-line interface for http://dkron.io/. 16 | It creates one Markdown file per command with front matter suitable 17 | for rendering in Hugo. 18 | 19 | ``` 20 | dkron doc [flags] 21 | ``` 22 | 23 | ### Options 24 | 25 | ``` 26 | --dir string the directory to write the doc. (default "/tmp/dkrondoc/") 27 | -h, --help help for doc 28 | ``` 29 | 30 | ### Options inherited from parent commands 31 | 32 | ``` 33 | --config string config file (default is /etc/dkron/dkron.yml) 34 | ``` 35 | 36 | ### SEE ALSO 37 | 38 | * [dkron](/docs/v2/cli/dkron/) - Professional distributed job scheduling system 39 | 40 | ###### Auto generated by spf13/cobra on 26-Aug-2019 41 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/cli/dkron_keygen.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-08-26 3 | title: "dkron keygen" 4 | slug: dkron_keygen 5 | url: /2.0/pro/cli/dkron_keygen/ 6 | --- 7 | ## dkron keygen 8 | 9 | Generates a new encryption key 10 | 11 | ### Synopsis 12 | 13 | Generates a new encryption key that can be used to configure the 14 | agent to encrypt traffic. The output of this command is already 15 | in the proper format that the agent expects. 16 | 17 | ``` 18 | dkron keygen [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for keygen 25 | ``` 26 | 27 | ### Options inherited from parent commands 28 | 29 | ``` 30 | --config string config file (default is /etc/dkron/dkron.yml) 31 | ``` 32 | 33 | ### SEE ALSO 34 | 35 | * [dkron](/docs/v2/cli/dkron/) - Professional distributed job scheduling system 36 | 37 | ###### Auto generated by spf13/cobra on 26-Aug-2019 38 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/cli/dkron_raft_list-peers.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-08-26 3 | title: "dkron raft list-peers" 4 | slug: dkron_raft_list-peers 5 | url: /2.0/pro/cli/dkron_raft_list-peers/ 6 | --- 7 | ## dkron raft list-peers 8 | 9 | Command to list raft peers 10 | 11 | ### Synopsis 12 | 13 | Command to list raft peers 14 | 15 | ``` 16 | dkron raft list-peers [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for list-peers 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --cert-file string Path to the client server TLS cert file 29 | --config string config file (default is /etc/dkron/dkron.yml) 30 | --key-file string Path to the client server TLS key file 31 | --rpc-addr string gRPC address of the agent (default "127.0.0.1:6868") 32 | --trusted-ca-file string Path to the client server TLS trusted CA cert file 33 | ``` 34 | 35 | ### SEE ALSO 36 | 37 | * [dkron raft](/docs/v2/cli/dkron_raft/) - Command to perform some raft operations 38 | 39 | ###### Auto generated by spf13/cobra on 26-Aug-2019 40 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/cli/dkron_version.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2019-08-26 3 | title: "dkron version" 4 | slug: dkron_version 5 | url: /2.0/pro/cli/dkron_version/ 6 | --- 7 | ## dkron version 8 | 9 | Show version 10 | 11 | ### Synopsis 12 | 13 | Show the version 14 | 15 | ``` 16 | dkron version [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for version 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file (default is /etc/dkron/dkron.yml) 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [dkron](/docs/v2/cli/dkron/) - Professional distributed job scheduling system 34 | 35 | ###### Auto generated by spf13/cobra on 26-Aug-2019 36 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/commercial-support.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Commercial Support 3 | --- 4 | 5 | Dkron offers only community support. Dkro Pro offers priority support via email. 6 | 7 | ## Priority Support 8 | 9 | Covers 1 incident per quarter, with a max response time of 2 working days. Scope is limited to Dkron and Dkron Pro features and APIs, not application integration or infrastructure. For support, email support AT distrib.works. Please email using the same domain as the original license email or explain your connection to the licensed company. 10 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/configuration.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | title: Configuration 4 | --- 5 | 6 | ## Configuration 7 | 8 | Dkron Pro uses the [same parameters](/docs/v2/basics/configuration) as Dkron OSS and add some extra parameters. 9 | 10 | ### Command line options 11 | 12 | * `--username` - Authentication username 13 | * `--password` - Authentication password 14 | * `--cert-file` - Path to the client server TLS cert file 15 | * `--key-file` - Path to the client server TLS key file 16 | * `--client-crl-file` - Path to the client certificate revocation list file 17 | * `--trusted-ca-file` - Path to the client server TLS trusted CA cert file 18 | * `--client-cert-auth` - Enable client cert authentication 19 | * `--auto-tls` - Client TLS using generated certificates 20 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/executors/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Executors 3 | --- 4 | 5 | {{% children style="h3" description="true" %}} 6 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/executors/docker.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Docker executor 3 | --- 4 | 5 | Docker executor can launch docker based cron jobs using the docker command of the target node. 6 | 7 | This executor needs a recent version of docker to be available and configured in the target node. 8 | 9 | ## Configuration 10 | 11 | To run a docker job create a job config with the docker executor as in this example: 12 | 13 | ```json 14 | { 15 | "executor": "docker", 16 | "executor_config": { 17 | "image": "alpine", //docker image to use 18 | "volumes": "/logs:/var/log/", //comma separated list of volume mappings 19 | "command": "echo \"Hello from dkron\"", //command to pass to run on container 20 | "env": "ENVIRONMENT=variable" //environment variables to pass to the container 21 | } 22 | } 23 | ``` 24 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/failover.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cross region failover 3 | --- 4 | 5 | Dkron Pro can run federated in failover mode, this allows to have two clusters running in different regions and configure one of the clusters in an active-passive fashion, doing a failover in case the active cluster dies. 6 | 7 | :::note 8 | This feature is experimental and should be handled with care. 9 | ::: 10 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/processors/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Processors 3 | --- 4 | 5 | {{% children style="h3" description="true" %}} 6 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/processors/elasticsearch.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Elasticsearch processor 3 | --- 4 | 5 | The Elasticsearch processor can fordward execution logs to an ES cluster. It need an already available Elasticsearch installation that is visible in the same network of the target node. 6 | 7 | The output logs of the job execution will be stored in the indicated ES instace. 8 | 9 | ## Configuration 10 | 11 | ```json 12 | { 13 | "processors": { 14 | "elasticsearch": { 15 | "url": "http://localhost:9200", //comma separated list of Elasticsearch hosts urls (default: http://localhost:9200) 16 | "index": "dkron_logs", //desired index name (default: dkron_logs) 17 | "forward": "false" //forward logs to the next processor (default: false) 18 | } 19 | } 20 | } 21 | ``` 22 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/processors/email.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Email processor 3 | --- 4 | 5 | The Email processor provides flexibility to job email notifications. 6 | 7 | Configuration of the email processor is stored in a file named `dkron-processor-email.yml` in the same locations as `dkron.yml`, and should include a list of providers, it can include any number of providers. 8 | 9 | Example: 10 | ```yaml 11 | provider1: 12 | host: smtp.myprovider.com 13 | port: 25 14 | username: myusername 15 | password: mypassword 16 | from: cron@mycompany.com 17 | subjectPrefix: '[Staging] ' 18 | ``` 19 | 20 | Then configure each job with the following options: 21 | 22 | Example: 23 | 24 | ```json 25 | { 26 | "processors": { 27 | "email": { 28 | "provider": "provider1", 29 | "emails": "team@mycompany.com, owner@mycompany.com", 30 | "onSuccess": "true" 31 | } 32 | } 33 | } 34 | ``` 35 | 36 | By default the email procesor doesn't send emails on job success, the `onSuccess` parameter, enables it, like in the previous example. 37 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/pro/processors/slack.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Slack processor 3 | --- 4 | 5 | The Slack processor provides slack notifications with multiple configurations and rich format. 6 | 7 | Configuration of the slack processor is stored in a file named `dkron-processor-slack.yml` in the same locations as `dkron.yml`, and should include a list of teams, it can include any number of teams. 8 | 9 | ![](/img/slack.png) 10 | 11 | Example: 12 | ```yaml 13 | team1: 14 | webhook_url: https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXX 15 | bot_name: Dkron Production 16 | ``` 17 | 18 | Then configure each job with the following options: 19 | 20 | Example: 21 | 22 | ```json 23 | { 24 | "processors": { 25 | "slack": { 26 | "team": "team1", 27 | "channel": "#cron-production", 28 | "onSuccess": "true" 29 | } 30 | } 31 | } 32 | ``` 33 | 34 | By default the slack procesor doesn't send notifications on job success, the `onSuccess` parameter, enables it, like in the previous example. 35 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/products/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Products 3 | weight: 70 4 | --- 5 | 6 | {{% children style="card" depth="2" description="true" %}} 7 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Usage" 3 | weight: 30 4 | --- 5 | 6 | {{% children style="card" depth="2" description="true" %}} 7 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/chaining.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Job chaining 3 | --- 4 | 5 | ## Job chaining 6 | 7 | You can set some jobs to run after other job is executed. To setup a job that will be executed after any other given job, just set the `parent_job` property when saving the new job. 8 | 9 | The dependent job will be executed after the main job finished a successful execution. 10 | 11 | Child jobs schedule property will be ignored if it's present. 12 | 13 | Take into account that parent jobs must be created before any child job. 14 | 15 | Example: 16 | 17 | ```json 18 | { 19 | "name": "job1", 20 | "schedule": "@every 10s", 21 | "executor": "shell", 22 | "executor_config": { 23 | "command": "echo \"Hello from parent\"" 24 | } 25 | } 26 | 27 | { 28 | "name": "child_job", 29 | "parent_job": "job1", 30 | "executor": "shell", 31 | "executor_config": { 32 | "command": "echo \"Hello from child\"" 33 | } 34 | } 35 | ``` 36 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/concurrency.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Concurrency 3 | toc: true 4 | --- 5 | 6 | ## Concurrency 7 | 8 | Jobs can be configured to allow overlapping executions or forbid them. 9 | 10 | Concurrency property accepts two option: 11 | 12 | * **allow** (default): Allow concurrent job executions. 13 | * **forbid**: If the job is already running don't send the execution, it will skip the executions until the next schedule. 14 | 15 | Example: 16 | 17 | ```json 18 | { 19 | "name": "job1", 20 | "schedule": "@every 10s", 21 | "executor": "shell", 22 | "executor_config": { 23 | "command": "echo \"Hello from parent\"" 24 | }, 25 | "concurrency": "forbid" 26 | } 27 | ``` 28 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/ecs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Use with AWS ECS 3 | --- 4 | 5 | :::note 6 | [Dkron Pro](/pro) comes with a [native ECS executor](/docs/v2/pro/executors/ecs) out of the box. 7 | ::: 8 | 9 | ## Use with Amazon ECS 10 | 11 | To use Dkron to schedule jobs that run in containers, a wrapper ECS script is needed. 12 | 13 | Install the following snippet in the node that will run the call to ECS 14 | 15 | <script src="https://gist.github.com/distribworks/3ac4aae9279d7c68c486fecccc2546cc.js"></script> 16 | 17 | ### Prerequisites 18 | 19 | The node that will run the call to ECS will need to have installed 20 | 21 | * AWS cli 22 | * jq 23 | 24 | ### Example 25 | 26 | `ecs-run --cluster cron --task-definition cron-taskdef --container-name cron --region us-east-1 --command "rake foo"` 27 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/executors/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Executors 3 | weight: 30 4 | --- 5 | 6 | ## Executors 7 | 8 | Executors plugins are the main mechanism of execution in Dkron. They implement different "types" of jobs in the sense that they can perform the most diverse actions on the target nodes. 9 | 10 | For example, the built-in `shell` executor, will run the indicated command in the target node. 11 | 12 | New plugins will be added, or you can create new ones, to perform different tasks, as HTTP requests, Docker runs, anything that you can imagine. 13 | 14 | [Dkron Pro](/pro/) have commercially supported executors 15 | 16 | {{% children %}} 17 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/executors/shell.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | title: Shell Executor 4 | --- 5 | 6 | Shell executor runs a system command 7 | 8 | ## Configuration 9 | 10 | Params 11 | 12 | ``` 13 | shell: Run this command using a shell environment 14 | command: The command to run 15 | env: Env vars separated by comma 16 | cwd: Chdir before command run 17 | ``` 18 | 19 | Example 20 | 21 | ```json 22 | { 23 | "executor": "shell", 24 | "executor_config": { 25 | "shell": "true", 26 | "command": "my_command", 27 | "env": "ENV_VAR=va1,ANOTHER_ENV_VAR=var2", 28 | "cwd": "/app" 29 | } 30 | } 31 | ``` 32 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/metatags.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Job metadata 3 | --- 4 | 5 | ## Job metadata 6 | 7 | Jobs can have an optional extra property field called `metadata` that allows to set arbitrary tags to jobs and query the jobs using the API: 8 | 9 | ```json 10 | { 11 | "name": "job_name", 12 | "command": "/bin/true", 13 | "schedule": "@every 2m", 14 | "metadata": { 15 | "user_id": "12345" 16 | } 17 | } 18 | ``` 19 | 20 | And then query the API to get only the results needed: 21 | 22 | ``` 23 | $ curl http://localhost:8080/v1/jobs --data-urlencode "metadata[user_id]=12345"` 24 | ``` 25 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/processors/file.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: File Processor 3 | --- 4 | 5 | File processor saves the execution output to a single log file in the specified directory 6 | 7 | ## Configuration 8 | 9 | Parameters 10 | 11 | ``` 12 | log_dir: Path to the location where the log files will be saved 13 | forward: Forward log output to the next processor 14 | ``` 15 | 16 | Example 17 | 18 | ```json 19 | { 20 | "name": "job_name", 21 | "command": "echo 'Hello files'", 22 | "schedule": "@every 2m", 23 | "tags": { 24 | "role": "web" 25 | }, 26 | "processors": { 27 | "files": { 28 | "log_dir": "/var/log/mydir", 29 | "forward": true 30 | } 31 | } 32 | } 33 | ``` 34 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/processors/log.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Log Processor 3 | --- 4 | 5 | Log processor writes the execution output to stdout/stderr 6 | 7 | ## Configuration 8 | 9 | Parameters 10 | 11 | `forward: Forward the output to the next processor` 12 | 13 | Example 14 | 15 | ```json 16 | { 17 | "name": "job_name", 18 | "command": "echo 'Hello log'", 19 | "schedule": "@every 2m", 20 | "tags": { 21 | "role": "web" 22 | }, 23 | "processors": { 24 | "log": { 25 | "forward": true 26 | } 27 | } 28 | } 29 | ``` 30 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/processors/syslog.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Syslog Processor 3 | --- 4 | 5 | Syslog processor writes the execution output to the system syslog daemon 6 | 7 | Note: Only work on linux systems 8 | 9 | ## Configuration 10 | 11 | Parameters 12 | 13 | `forward: Forward the output to the next processor` 14 | 15 | Example 16 | 17 | ```json 18 | { 19 | "name": "job_name", 20 | "command": "echo 'Hello syslog'", 21 | "schedule": "@every 2m", 22 | "tags": { 23 | "role": "web" 24 | }, 25 | "processors": { 26 | "syslog": { 27 | "forward": true 28 | } 29 | } 30 | } 31 | ``` 32 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/retries.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Job retries 3 | --- 4 | 5 | Jobs can be configured to retry in case of failure. 6 | 7 | ## Configuration 8 | 9 | ```json 10 | { 11 | "name": "job1", 12 | "schedule": "@every 10s", 13 | "executor": "shell", 14 | "executor_config": { 15 | "command": "echo \"Hello from parent\"" 16 | }, 17 | "retries": 5 18 | } 19 | ``` 20 | 21 | In case of failure to run the job in one node, it will try to run the job again in that node until the retries count reaches the limit. 22 | 23 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v2/usage/storage.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Embedded storage 3 | --- 4 | 5 | Dkron has an embedded distributed KV store engine based on BadgerDB. This works out of the box on each dkron server. 6 | 7 | This ensures a dead easy install and setup, basically run dkron and you will have a full working node. 8 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/basics/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Basics", 3 | "position": 1 4 | } 5 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/cli/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "CLI" 3 | } 4 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/cli/dkron_completion_powershell.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron completion powershell" 4 | slug: dkron_completion_powershell 5 | url: /cli/dkron_completion_powershell/ 6 | --- 7 | ## dkron completion powershell 8 | 9 | Generate the autocompletion script for powershell 10 | 11 | ### Synopsis 12 | 13 | Generate the autocompletion script for powershell. 14 | 15 | To load completions in your current shell session: 16 | 17 | dkron completion powershell | Out-String | Invoke-Expression 18 | 19 | To load completions for every new session, add the output of the above command 20 | to your powershell profile. 21 | 22 | 23 | ``` 24 | dkron completion powershell [flags] 25 | ``` 26 | 27 | ### Options 28 | 29 | ``` 30 | -h, --help help for powershell 31 | --no-descriptions disable completion descriptions 32 | ``` 33 | 34 | ### Options inherited from parent commands 35 | 36 | ``` 37 | --config string config file path 38 | ``` 39 | 40 | ### SEE ALSO 41 | 42 | * [dkron completion](/docs/cli/dkron_completion/) - Generate the autocompletion script for the specified shell 43 | 44 | ###### Auto generated by spf13/cobra on 5-Jun-2022 45 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/cli/dkron_doc.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron doc" 4 | slug: dkron_doc 5 | url: /cli/dkron_doc/ 6 | --- 7 | ## dkron doc 8 | 9 | Generate Markdown documentation for the Dkron CLI. 10 | 11 | ### Synopsis 12 | 13 | Generate Markdown documentation for the Dkron CLI. 14 | This command is, mostly, used to create up-to-date documentation 15 | of Dkron's command-line interface for http://dkron.io/. 16 | It creates one Markdown file per command with front matter suitable 17 | for rendering in Hugo. 18 | 19 | ``` 20 | dkron doc [flags] 21 | ``` 22 | 23 | ### Options 24 | 25 | ``` 26 | --dir string the directory to write the doc. (default "/tmp/dkrondoc/") 27 | -h, --help help for doc 28 | ``` 29 | 30 | ### Options inherited from parent commands 31 | 32 | ``` 33 | --config string config file path 34 | ``` 35 | 36 | ### SEE ALSO 37 | 38 | * [dkron](/docs/cli/dkron/) - Open source distributed job scheduling system 39 | 40 | ###### Auto generated by spf13/cobra on 5-Jun-2022 41 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/cli/dkron_keygen.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron keygen" 4 | slug: dkron_keygen 5 | url: /cli/dkron_keygen/ 6 | --- 7 | ## dkron keygen 8 | 9 | Generates a new encryption key 10 | 11 | ### Synopsis 12 | 13 | Generates a new encryption key that can be used to configure the 14 | agent to encrypt traffic. The output of this command is already 15 | in the proper format that the agent expects. 16 | 17 | ``` 18 | dkron keygen [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for keygen 25 | ``` 26 | 27 | ### Options inherited from parent commands 28 | 29 | ``` 30 | --config string config file path 31 | ``` 32 | 33 | ### SEE ALSO 34 | 35 | * [dkron](/docs/cli/dkron/) - Open source distributed job scheduling system 36 | 37 | ###### Auto generated by spf13/cobra on 5-Jun-2022 38 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/cli/dkron_leave.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron leave" 4 | slug: dkron_leave 5 | url: /cli/dkron_leave/ 6 | --- 7 | ## dkron leave 8 | 9 | Force an agent to leave the cluster 10 | 11 | ### Synopsis 12 | 13 | Stop stops an agent, if the agent is a server and is running for election 14 | stop running for election, if this server was the leader 15 | this will force the cluster to elect a new leader and start a new scheduler. 16 | 17 | ``` 18 | dkron leave [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for leave 25 | --rpc-addr string gRPC address of the agent (default "{{ GetPrivateIP }}:6868") 26 | ``` 27 | 28 | ### Options inherited from parent commands 29 | 30 | ``` 31 | --config string config file path 32 | ``` 33 | 34 | ### SEE ALSO 35 | 36 | * [dkron](/docs/cli/dkron/) - Open source distributed job scheduling system 37 | 38 | ###### Auto generated by spf13/cobra on 5-Jun-2022 39 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/cli/dkron_raft.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron raft" 4 | slug: dkron_raft 5 | url: /cli/dkron_raft/ 6 | --- 7 | ## dkron raft 8 | 9 | Command to perform some raft operations 10 | 11 | ### Options 12 | 13 | ``` 14 | -h, --help help for raft 15 | --rpc-addr string gRPC address of the agent. (default "{{ GetPrivateIP }}:6868") 16 | ``` 17 | 18 | ### Options inherited from parent commands 19 | 20 | ``` 21 | --config string config file path 22 | ``` 23 | 24 | ### SEE ALSO 25 | 26 | * [dkron](/docs/cli/dkron/) - Open source distributed job scheduling system 27 | * [dkron raft list-peers](/docs/cli/dkron_raft_list-peers/) - Command to list raft peers 28 | * [dkron raft remove-peer](/docs/cli/dkron_raft_remove-peer/) - Command to list raft peers 29 | 30 | ###### Auto generated by spf13/cobra on 5-Jun-2022 31 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/cli/dkron_raft_list-peers.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron raft list-peers" 4 | slug: dkron_raft_list-peers 5 | url: /cli/dkron_raft_list-peers/ 6 | --- 7 | ## dkron raft list-peers 8 | 9 | Command to list raft peers 10 | 11 | ``` 12 | dkron raft list-peers [flags] 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for list-peers 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --config string config file path 25 | --rpc-addr string gRPC address of the agent. (default "{{ GetPrivateIP }}:6868") 26 | ``` 27 | 28 | ### SEE ALSO 29 | 30 | * [dkron raft](/docs/cli/dkron_raft/) - Command to perform some raft operations 31 | 32 | ###### Auto generated by spf13/cobra on 5-Jun-2022 33 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/cli/dkron_raft_remove-peer.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron raft remove-peer" 4 | slug: dkron_raft_remove-peer 5 | url: /cli/dkron_raft_remove-peer/ 6 | --- 7 | ## dkron raft remove-peer 8 | 9 | Command to list raft peers 10 | 11 | ``` 12 | dkron raft remove-peer [flags] 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for remove-peer 19 | --peer-id string Remove a Dkron server with the given ID from the Raft configuration. 20 | ``` 21 | 22 | ### Options inherited from parent commands 23 | 24 | ``` 25 | --config string config file path 26 | --rpc-addr string gRPC address of the agent. (default "{{ GetPrivateIP }}:6868") 27 | ``` 28 | 29 | ### SEE ALSO 30 | 31 | * [dkron raft](/docs/cli/dkron_raft/) - Command to perform some raft operations 32 | 33 | ###### Auto generated by spf13/cobra on 5-Jun-2022 34 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/cli/dkron_version.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2022-06-05 3 | title: "dkron version" 4 | slug: dkron_version 5 | url: /cli/dkron_version/ 6 | --- 7 | ## dkron version 8 | 9 | Show version 10 | 11 | ### Synopsis 12 | 13 | Show the version 14 | 15 | ``` 16 | dkron version [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for version 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file path 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [dkron](/docs/cli/dkron/) - Open source distributed job scheduling system 34 | 35 | ###### Auto generated by spf13/cobra on 5-Jun-2022 36 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Pro" 3 | } 4 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dkron Pro 3 | weight: 40 4 | --- 5 | 6 | {{% children style="li" depth="999" %}} 7 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/auth.md: -------------------------------------------------------------------------------- 1 | # Authentication 2 | 3 | Dkron Pro has the ability to be configured to use HTTP basic auth. 4 | 5 | Authentication can be set using these parameters in the dkron config file: 6 | 7 | ```yaml 8 | # dkron.yml 9 | username: dkron_admin 10 | password: adminpassword 11 | ``` 12 | 13 | This will enable auth on the WebUI and for the API. 14 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/cli/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "CLI" 3 | } 4 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/cli/dkron_doc.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2023-09-02 3 | title: "dkron doc" 4 | slug: dkron_doc 5 | url: /docs/pro/cli/dkron_doc/ 6 | --- 7 | ## dkron doc 8 | 9 | Generate Markdown documentation for the Dkron CLI. 10 | 11 | ### Synopsis 12 | 13 | Generate Markdown documentation for the Dkron CLI. 14 | This command is, mostly, used to create up-to-date documentation 15 | of Dkron's command-line interface for http://dkron.io/. 16 | It creates one Markdown file per command with front matter suitable 17 | for rendering in Hugo. 18 | 19 | ``` 20 | dkron doc [flags] 21 | ``` 22 | 23 | ### Options 24 | 25 | ``` 26 | --dir string the directory to write the doc. (default "/tmp/dkrondoc/") 27 | -h, --help help for doc 28 | ``` 29 | 30 | ### Options inherited from parent commands 31 | 32 | ``` 33 | --config string config file (default is /etc/dkron/dkron.yml) 34 | ``` 35 | 36 | ### SEE ALSO 37 | 38 | * [dkron](/docs/pro/cli/dkron/) - Professional distributed job scheduling system 39 | 40 | ###### Auto generated by spf13/cobra on 2-Sep-2023 41 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/cli/dkron_keygen.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2023-09-02 3 | title: "dkron keygen" 4 | slug: dkron_keygen 5 | url: /docs/pro/cli/dkron_keygen/ 6 | --- 7 | ## dkron keygen 8 | 9 | Generates a new encryption key 10 | 11 | ### Synopsis 12 | 13 | Generates a new encryption key that can be used to configure the 14 | agent to encrypt traffic. The output of this command is already 15 | in the proper format that the agent expects. 16 | 17 | ``` 18 | dkron keygen [flags] 19 | ``` 20 | 21 | ### Options 22 | 23 | ``` 24 | -h, --help help for keygen 25 | ``` 26 | 27 | ### Options inherited from parent commands 28 | 29 | ``` 30 | --config string config file (default is /etc/dkron/dkron.yml) 31 | ``` 32 | 33 | ### SEE ALSO 34 | 35 | * [dkron](/docs/pro/cli/dkron/) - Professional distributed job scheduling system 36 | 37 | ###### Auto generated by spf13/cobra on 2-Sep-2023 38 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/cli/dkron_raft.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2023-09-02 3 | title: "dkron raft" 4 | slug: dkron_raft 5 | url: /docs/pro/cli/dkron_raft/ 6 | --- 7 | ## dkron raft 8 | 9 | Command to perform some raft operations 10 | 11 | ### Options 12 | 13 | ``` 14 | --cert-file string Path to the client server TLS cert file 15 | -h, --help help for raft 16 | --key-file string Path to the client server TLS key file 17 | --rpc-addr string gRPC address of the agent. (default "{{ GetPrivateIP }}:6868") 18 | --trusted-ca-file string Path to the client server TLS trusted CA cert file 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --config string config file (default is /etc/dkron/dkron.yml) 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [dkron](/docs/pro/cli/dkron/) - Professional distributed job scheduling system 30 | * [dkron raft list-peers](/docs/pro/cli/dkron_raft_list-peers/) - Command to list raft peers 31 | * [dkron raft remove-peer](/docs/pro/cli/dkron_raft_remove-peer/) - Command to list raft peers 32 | 33 | ###### Auto generated by spf13/cobra on 2-Sep-2023 34 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/cli/dkron_raft_list-peers.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2023-09-02 3 | title: "dkron raft list-peers" 4 | slug: dkron_raft_list-peers 5 | url: /docs/pro/cli/dkron_raft_list-peers/ 6 | --- 7 | ## dkron raft list-peers 8 | 9 | Command to list raft peers 10 | 11 | ``` 12 | dkron raft list-peers [flags] 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for list-peers 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --cert-file string Path to the client server TLS cert file 25 | --config string config file (default is /etc/dkron/dkron.yml) 26 | --key-file string Path to the client server TLS key file 27 | --rpc-addr string gRPC address of the agent. (default "{{ GetPrivateIP }}:6868") 28 | --trusted-ca-file string Path to the client server TLS trusted CA cert file 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [dkron raft](/docs/pro/cli/dkron_raft/) - Command to perform some raft operations 34 | 35 | ###### Auto generated by spf13/cobra on 2-Sep-2023 36 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/cli/dkron_raft_remove-peer.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2023-09-02 3 | title: "dkron raft remove-peer" 4 | slug: dkron_raft_remove-peer 5 | url: /docs/pro/cli/dkron_raft_remove-peer/ 6 | --- 7 | ## dkron raft remove-peer 8 | 9 | Command to list raft peers 10 | 11 | ``` 12 | dkron raft remove-peer [flags] 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for remove-peer 19 | --peer-id string Remove a Dkron server with the given ID from the Raft configuration. 20 | ``` 21 | 22 | ### Options inherited from parent commands 23 | 24 | ``` 25 | --cert-file string Path to the client server TLS cert file 26 | --config string config file (default is /etc/dkron/dkron.yml) 27 | --key-file string Path to the client server TLS key file 28 | --rpc-addr string gRPC address of the agent. (default "{{ GetPrivateIP }}:6868") 29 | --trusted-ca-file string Path to the client server TLS trusted CA cert file 30 | ``` 31 | 32 | ### SEE ALSO 33 | 34 | * [dkron raft](/docs/pro/cli/dkron_raft/) - Command to perform some raft operations 35 | 36 | ###### Auto generated by spf13/cobra on 2-Sep-2023 37 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/cli/dkron_version.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2023-09-02 3 | title: "dkron version" 4 | slug: dkron_version 5 | url: /docs/pro/cli/dkron_version/ 6 | --- 7 | ## dkron version 8 | 9 | Show version 10 | 11 | ### Synopsis 12 | 13 | Show the version 14 | 15 | ``` 16 | dkron version [flags] 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for version 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --config string config file (default is /etc/dkron/dkron.yml) 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [dkron](/docs/pro/cli/dkron/) - Professional distributed job scheduling system 34 | 35 | ###### Auto generated by spf13/cobra on 2-Sep-2023 36 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/commercial-support.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Commercial Support 3 | --- 4 | 5 | Dkron offers only community support. Dkro Pro offers priority support via email. 6 | 7 | ## Priority Support 8 | 9 | Covers 1 incident per quarter, with a max response time of 2 working days. Scope is limited to Dkron and Dkron Pro features and APIs, not application integration or infrastructure. For support, email support AT distrib.works. Please email using the same domain as the original license email or explain your connection to the licensed company. 10 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/configuration.md: -------------------------------------------------------------------------------- 1 | # Configuration 2 | 3 | Dkron Pro uses the [same parameters](/docs/basics/configuration) as Dkron OSS and add some extra parameters. 4 | 5 | ### Command line options 6 | 7 | * `--username` - Authentication username 8 | * `--password` - Authentication password 9 | * `--cert-file` - Path to the client server TLS cert file 10 | * `--key-file` - Path to the client server TLS key file 11 | * `--client-crl-file` - Path to the client certificate revocation list file 12 | * `--trusted-ca-file` - Path to the client server TLS trusted CA cert file 13 | * `--client-cert-auth` - Enable client cert authentication 14 | * `--auto-tls` - Client TLS using generated certificates 15 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/executors/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Executors" 3 | } 4 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/executors/docker.md: -------------------------------------------------------------------------------- 1 | # Docker executor 2 | 3 | Docker executor can launch docker based cron jobs using the docker command of the target node. 4 | 5 | This executor needs a recent version of docker to be available and configured in the target node. 6 | 7 | ## Configuration 8 | 9 | To run a docker job create a job config with the docker executor as in this example: 10 | 11 | ```json 12 | { 13 | "executor": "docker", 14 | "executor_config": { 15 | "image": "alpine", //docker image to use 16 | "volumes": "/logs:/var/log/", //comma separated list of volume mappings 17 | "command": "echo \"Hello from dkron\"", //command to pass to run on container 18 | "env": "ENVIRONMENT=variable" //environment variables to pass to the container 19 | } 20 | } 21 | ``` 22 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/failover.md: -------------------------------------------------------------------------------- 1 | # Cross region failover 2 | 3 | :::warning 4 | This feature is experimental and should be handled with care. 5 | ::: 6 | 7 | Dkron Pro can run federated in failover mode, this allows to have two clusters running in different regions and configure one of the clusters in an active-passive fashion, doing a failover in case the active cluster dies. 8 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/processors/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Processors" 3 | } 4 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/processors/email.md: -------------------------------------------------------------------------------- 1 | # Email processor 2 | 3 | The Email processor provides flexibility to job email notifications. 4 | 5 | Configuration of the email processor is stored in a file named `dkron-processor-email.yml` in the same locations as `dkron.yml`, and should include a list of providers, it can include any number of providers. 6 | 7 | Example: 8 | ```yaml 9 | provider1: 10 | host: smtp.myprovider.com 11 | port: 25 12 | username: myusername 13 | password: mypassword 14 | from: cron@mycompany.com 15 | subjectPrefix: '[Staging] ' 16 | ``` 17 | 18 | Then configure each job with the following options: 19 | 20 | Example: 21 | 22 | ```json 23 | { 24 | "processors": { 25 | "email": { 26 | "provider": "provider1", 27 | "emails": "team@mycompany.com, owner@mycompany.com", 28 | "onSuccess": "true" 29 | } 30 | } 31 | } 32 | ``` 33 | 34 | By default the email procesor doesn't send emails on job success, the `onSuccess` parameter, enables it, like in the previous example. 35 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/pro/processors/slack.md: -------------------------------------------------------------------------------- 1 | # Slack processor 2 | 3 | The Slack processor provides slack notifications with multiple configurations and rich format. 4 | 5 | Configuration of the slack processor is stored in a file named `dkron-processor-slack.yml` in the same locations as `dkron.yml`, and should include a list of teams, it can include any number of teams. 6 | 7 | ![](/img/slack.png) 8 | 9 | Example: 10 | ```yaml 11 | team1: 12 | webhook_url: https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXX 13 | bot_name: Dkron Production 14 | ``` 15 | 16 | Then configure each job with the following options: 17 | 18 | Example: 19 | 20 | ```json 21 | { 22 | "processors": { 23 | "slack": { 24 | "team": "team1", 25 | "channel": "#cron-production", 26 | "onSuccess": "true" 27 | } 28 | } 29 | } 30 | ``` 31 | 32 | By default the slack procesor doesn't send notifications on job success, the `onSuccess` parameter, enables it, like in the previous example. 33 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/upgrading/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Upgrading" 3 | } 4 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/upgrading/from_v2_0_to_v2_2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Upgrade from v2.0.x to v2.2.x 3 | --- 4 | 5 | ## Migrating Jobs 6 | 7 | To migrate jobs from v2.0.x to v2.2.x, export jobs from the v2.0.x cluster and import them into v2.2.x 8 | 9 | Refer to the [backup&restore upgrade guide](/docs/usage/upgrade#backup--restore) 10 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Usage", 3 | "position": 2 4 | } 5 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/chaining.md: -------------------------------------------------------------------------------- 1 | # Job chaining 2 | 3 | You can set some jobs to run after other job is executed. To setup a job that will be executed after any other given job, just set the `parent_job` property when saving the new job. 4 | 5 | The dependent job will be executed after the main job finished a successful execution. 6 | 7 | Child jobs schedule property will be ignored if it's present. 8 | 9 | Take into account that parent jobs must be created before any child job. 10 | 11 | Example: 12 | 13 | ```json 14 | { 15 | "name": "job1", 16 | "schedule": "@every 10s", 17 | "executor": "shell", 18 | "executor_config": { 19 | "command": "echo \"Hello from parent\"" 20 | } 21 | } 22 | 23 | { 24 | "name": "child_job", 25 | "parent_job": "job1", 26 | "executor": "shell", 27 | "executor_config": { 28 | "command": "echo \"Hello from child\"" 29 | } 30 | } 31 | ``` 32 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/concurrency.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Concurrency 3 | toc: true 4 | --- 5 | 6 | ## Concurrency 7 | 8 | Jobs can be configured to allow overlapping executions or forbid them. 9 | 10 | Concurrency property accepts two option: 11 | 12 | * **allow** (default): Allow concurrent job executions. 13 | * **forbid**: If the job is already running don't send the execution, it will skip the executions until the next schedule. 14 | 15 | Example: 16 | 17 | ```json 18 | { 19 | "name": "job1", 20 | "schedule": "@every 10s", 21 | "executor": "shell", 22 | "executor_config": { 23 | "command": "echo \"Hello from parent\"" 24 | }, 25 | "concurrency": "forbid" 26 | } 27 | ``` 28 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/ecs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Use with AWS ECS 3 | --- 4 | 5 | :::tip 6 | [Dkron Pro](/pro) comes with a [native ECS executor](/docs/pro/executors/ecs/) out of the box. 7 | ::: 8 | 9 | ## Use with Amazon ECS 10 | 11 | To use Dkron to schedule jobs that run in containers, a wrapper ECS script is needed. 12 | 13 | Install the following snippet in the node that will run the call to ECS 14 | 15 | <script src="https://gist.github.com/distribworks/3ac4aae9279d7c68c486fecccc2546cc.js"></script> 16 | 17 | ### Prerequisites 18 | 19 | The node that will run the call to ECS will need to have installed 20 | 21 | * AWS cli 22 | * jq 23 | 24 | ### Example 25 | 26 | `ecs-run --cluster cron --task-definition cron-taskdef --container-name cron --region us-east-1 --command "rake foo"` 27 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/executors/grpc.md: -------------------------------------------------------------------------------- 1 | # GRPC Executor 2 | 3 | GRPC executor can send a request to a GRPC Server 4 | 5 | 6 | ## Requirements 7 | In order to serialize protobufs the server need's to have the reflection service active. 8 | Without that we cannot get proto descriptors required for serialization. 9 | 10 | ## Configuration 11 | 12 | Params: 13 | 14 | ``` 15 | "url": Required, Request url 16 | "body": Optional, POST body 17 | "timeout": Optional, Request timeout, unit seconds 18 | "expectCode": Optional, One of https://grpc.github.io/grpc/core/md_doc_statuscodes.html 19 | ``` 20 | 21 | Example 22 | 23 | ```json 24 | { 25 | "executor": "http", 26 | "executor_config": { 27 | "url": "127.0.0.1:9000/test.TestService/Test", 28 | "body": "{\"key\": \"value\"}", 29 | "timeout": "30", 30 | "expectCode": "0" 31 | } 32 | } 33 | ``` 34 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/executors/index.md: -------------------------------------------------------------------------------- 1 | # Executors 2 | 3 | Executor plugins are the main mechanism of execution in Dkron. They implement different "types" of jobs in the sense that they can perform the most diverse actions on the target nodes. 4 | 5 | For example, the built-in `shell` executor, will run the indicated command on the target node. 6 | 7 | New plugins will be added, or you can create new ones, to perform different tasks, such as HTTP requests, Docker runs, anything that you can imagine. 8 | 9 | If you need more features you can check [Dkron Pro](/pro) that brings commercially supported plugins. 10 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/executors/kafka.md: -------------------------------------------------------------------------------- 1 | # Kafka Executor 2 | 3 | A basic Kafka executor that produces a message on a Kafka broker. 4 | 5 | ## Configuration 6 | 7 | Params 8 | 9 | ``` 10 | brokerAddress: Comma separated string containing "IP:port" of the brokers 11 | key: The key of the message to produce 12 | message: The body of the message to produce 13 | topic: The Kafka topic for this message 14 | tlsEnable: Enables TLS if set to true. Optional 15 | tlsInsecureSkipVerify: Disables verification of the remote SSL certificate's validity if set to true. Optional 16 | debug: Turns on debugging output if not empty 17 | ``` 18 | 19 | Example 20 | 21 | ```json 22 | "executor": "kafka", 23 | "executor_config": { 24 | "brokerAddress": "localhost:9092,another.host:9092", 25 | "key": "My key", 26 | "message": "My message", 27 | "topic": "my_topic" 28 | } 29 | ``` 30 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/executors/nats.md: -------------------------------------------------------------------------------- 1 | # NATS Executor 2 | 3 | The NATS executor sends a message to a NATS server/cluster. 4 | 5 | Currently, only username/password authentication is supported. 6 | 7 | ## Configuration 8 | 9 | Params 10 | 11 | ``` 12 | url: Comma separated list of NATS server URLs 13 | message: The message to send 14 | subject: The subject to send the message to 15 | userName: username for authentication 16 | password: password for authentication 17 | debug: If not empty, turns on debugging. Will log the NATS specific job config and the request sent. 18 | ``` 19 | 20 | Example 21 | 22 | ```json 23 | { 24 | "executor": "nats", 25 | "executor_config": { 26 | "url": "tls://nats.demo.io:4443", 27 | "message": "the message", 28 | "subject": "myfavoritesubject", 29 | "userName":"someusername", 30 | "password":"somepassword" 31 | } 32 | ``` 33 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/metatags.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Job metadata 3 | --- 4 | 5 | ## Job metadata 6 | 7 | Jobs can have an optional extra property field called `metadata` that allows to set arbitrary tags to jobs and query the jobs using the API: 8 | 9 | ```json 10 | { 11 | "name": "job_name", 12 | "command": "/bin/true", 13 | "schedule": "@every 2m", 14 | "metadata": { 15 | "user_id": "12345" 16 | } 17 | } 18 | ``` 19 | 20 | And then query the API to get only the results needed: 21 | 22 | ``` 23 | $ curl http://localhost:8080/v1/jobs --data-urlencode "metadata[user_id]=12345"` 24 | ``` 25 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/plugins/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Plugins" 3 | } 4 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/plugins/index.md: -------------------------------------------------------------------------------- 1 | # Plugins 2 | 3 | ## Intro 4 | 5 | Plugins in Dkron allow you to add funcionality that integrates with the workflow of the job execution in Dkron. It's a powerful system that allows you to extend and adapt Dkron to your special needs. 6 | 7 | This page documents the basics of how the plugin system in Dkron works, and how to setup a basic development environment for plugin development if you're writing a Dkron plugin. 8 | 9 | ## How it Works 10 | 11 | Dkron execution execution processors are provided via plugins. Each plugin exposes functionality for modifying the execution. Plugins are executed as a separate process and communicate with the main Dkron binary over an RPC interface. 12 | 13 | The code within the binaries must adhere to certain interfaces. The network communication and RPC is handled automatically by higher-level libraries. The exact interface to implement is documented in its respective documentation section. 14 | 15 | ## Installing a Plugin 16 | 17 | Dkron searches for plugins at startup, to install a plugin just drop the binary in one of the following locations: 18 | 19 | 1. /etc/dkron/plugins 20 | 2. Dkron executable directory 21 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/processors/file.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: File Processor 3 | --- 4 | 5 | File processor saves the execution output to a single log file in the specified directory 6 | 7 | ## Configuration 8 | 9 | Parameters 10 | 11 | ``` 12 | log_dir: Path to the location where the log files will be saved 13 | forward: Forward log output to the next processor 14 | ``` 15 | 16 | Example 17 | 18 | ```json 19 | { 20 | "name": "job_name", 21 | "command": "echo 'Hello files'", 22 | "schedule": "@every 2m", 23 | "tags": { 24 | "role": "web" 25 | }, 26 | "processors": { 27 | "files": { 28 | "log_dir": "/var/log/mydir", 29 | "forward": "true" 30 | } 31 | } 32 | } 33 | ``` 34 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/processors/log.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Log Processor 3 | --- 4 | 5 | Log processor writes the execution output to stdout/stderr 6 | 7 | ## Configuration 8 | 9 | Parameters 10 | 11 | `forward: Forward the output to the next processor` 12 | 13 | Example 14 | 15 | ```json 16 | { 17 | "name": "job_name", 18 | "command": "echo 'Hello log'", 19 | "schedule": "@every 2m", 20 | "tags": { 21 | "role": "web" 22 | }, 23 | "processors": { 24 | "log": { 25 | "forward": "true" 26 | } 27 | } 28 | } 29 | ``` 30 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/processors/syslog.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Syslog Processor 3 | --- 4 | 5 | Syslog processor writes the execution output to the system syslog daemon 6 | 7 | Note: Only work on linux systems 8 | 9 | ## Configuration 10 | 11 | Parameters 12 | 13 | `forward: Forward the output to the next processor` 14 | 15 | Example 16 | 17 | ```json 18 | { 19 | "name": "job_name", 20 | "command": "echo 'Hello syslog'", 21 | "schedule": "@every 2m", 22 | "tags": { 23 | "role": "web" 24 | }, 25 | "processors": { 26 | "syslog": { 27 | "forward": "true" 28 | } 29 | } 30 | } 31 | ``` 32 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/retries.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Job retries 3 | --- 4 | 5 | Jobs can be configured to retry in case of failure. 6 | 7 | ## Configuration 8 | 9 | ```json 10 | { 11 | "name": "job1", 12 | "schedule": "@every 10s", 13 | "executor": "shell", 14 | "executor_config": { 15 | "command": "echo \"Hello from parent\"" 16 | }, 17 | "retries": 5 18 | } 19 | ``` 20 | 21 | In case of failure to run the job in one node, it will try to run the job again in that node until the retries count reaches the limit. 22 | 23 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/storage.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Embedded storage 3 | --- 4 | 5 | Dkron has an embedded distributed KV store engine based on BuntDB. This works out of the box on each dkron server. 6 | 7 | This ensures a dead easy install and setup, basically run dkron and you will have a full working node. 8 | -------------------------------------------------------------------------------- /website/versioned_docs/version-v3/usage/upgrade.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Upgrade methods 3 | --- 4 | 5 | Use one of the following methods (depending on the changes) to upgrade a cluster to a newer version. 6 | 7 | ### Rolling upgrade 8 | 9 | Use the following procedure to rotate all cluster nodes, one server at a time: 10 | 11 | 1. Add a new server to the cluster with a configuration that joins them to the existing cluster. 12 | 1. Stop dkron service on one of the old servers, if it was the leader allow a new leader to be elected. Note that it is better to remove the current leader at the end, to ensure a leader is elected from the new nodes. 13 | 1. Use `dkron raft list-peers` to list current cluster nodes. 14 | 1. Use `dkron raft remove-peer` to forcefully remove the old server. 15 | 1. Repeat steps above until all old cluster nodes have been upgraded. 16 | 17 | ### Backup & Restore 18 | 19 | Use the `/restore` API endpoint to restore a previously exported jobs file 20 | 21 | ``` 22 | curl localhost:8080/v1/jobs > backup.json 23 | curl localhost:8080/v1/restore --form 'file=@backup.json' 24 | ``` 25 | 26 | This will restore all jobs and counters as they were in the export file. 27 | -------------------------------------------------------------------------------- /website/versioned_sidebars/version-v1-sidebars.json: -------------------------------------------------------------------------------- 1 | { 2 | "tutorialSidebar": [ 3 | { 4 | "type": "autogenerated", 5 | "dirName": "." 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /website/versioned_sidebars/version-v2-sidebars.json: -------------------------------------------------------------------------------- 1 | { 2 | "tutorialSidebar": [ 3 | { 4 | "type": "autogenerated", 5 | "dirName": "." 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /website/versioned_sidebars/version-v3-sidebars.json: -------------------------------------------------------------------------------- 1 | { 2 | "tutorialSidebar": [ 3 | { 4 | "type": "autogenerated", 5 | "dirName": "." 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /website/versions.json: -------------------------------------------------------------------------------- 1 | [ 2 | "v3", 3 | "v2", 4 | "v1" 5 | ] 6 | --------------------------------------------------------------------------------