Skip to main content

SnailJob python客户端开发的Shell执行器

Project description

snailjob-shell-executor

基于snail-job 项目的snail-job项目 java 后端开发的Linux Shell 执行器,用于执行定时任务。具有以下特点

  1. 一键安装,job调整只需要在控制中心配置即可,不需要编写 Python 脚本
  2. 同时可以作为普通snail-job包引入,编写自己的任务脚本
  3. 支持结果上报,支持日志上报

开始使用

# 创建工作目录
mkdir /services/snailjob_executor
# 下载安装文件
curl -L xxxxx()

# 安装snailjob
./install_snailjob_shell_executor.sh
步骤1: 检查Python版本
Python 当前版本为 3.8 符合(Python 3.8-3.11)
步骤2: 创建虚拟环境 venv...
步骤3: 安装 snailjob-shell-executor...
步骤4: 生成默认 .env 文件
复制 .env 文件到当前目录...
# 配置 .env 文件
步骤5: 开始配置 .env 文件(直接回车保留当前默认值):
接入组名 (默认: snail_job_demo_group): snailjob_optgroup
客户端绑定IP,必须服务器可以访问到 (默认: 127.0.0.1):
服务器IP地址(或域名) (默认: 127.0.0.1):
客户端通讯端口 (默认: 17889):
服务器通讯端口(不是后台管理页面服务端口) (默认: 17888):
接入命名空间 (默认: 764d604ec6fc45f68cd92514c40e9e1a): 764d604ec6fc45f68cd92514c40e9e1a
接入组 token (默认: SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj): SJ_Wyz3dmsdbDOkDujOTSSoBjGQP1BMsVnj
# 生成启动文件
步骤6: 生成 Supervisor 配置
Supervisor 配置文件已生成: snailjob_supervisor.conf
# 前台启动测试
步骤7: 启动 snailjob_shell_executor
前台启动,请检查执行器是否注册成功和心跳正常...(生产环境请使用snailjob_supervisor.conf配置)
2025-03-26 14:26:34,821 | SnailJob Local Logger  | INFO     | 成功注册执行器: shellCommandExecutor
2025-03-26 14:26:34,866 | SnailJob Local Logger  | INFO     | 发送心跳成功: reqId=1742970394821

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snailjob_shell_executor-0.0.5.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snailjob_shell_executor-0.0.5-py3-none-any.whl (50.7 kB view details)

Uploaded Python 3

File details

Details for the file snailjob_shell_executor-0.0.5.tar.gz.

File metadata

  • Download URL: snailjob_shell_executor-0.0.5.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for snailjob_shell_executor-0.0.5.tar.gz
Algorithm Hash digest
SHA256 073e6b1783bfd17df80775adc855cc83ced87c46e594142bdc1ad6ed4e2fc64f
MD5 24abedaff3ebe4c4664a82698694c5c3
BLAKE2b-256 48142217bc81583485655858b8a9bc45c5ec1e145b2e8dcfefb4d33ae45ddfc0

See more details on using hashes here.

File details

Details for the file snailjob_shell_executor-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: snailjob_shell_executor-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 50.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for snailjob_shell_executor-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6750f5e6f5a789706cd5d93f9099750357ff516c7782d3c06e074cac63228758
MD5 bb45ca20de895a05a21895edc314360f
BLAKE2b-256 f2841c168aff4b063477edfa2be0a77b7446c9d1468200ab8542e4ef1cc36a78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page