npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@whyour/qinglong

v0.18.0

Published

Timed task management platform supporting Python3, JavaScript, Shell, Typescript

Downloads

320

Readme

简体中文 | English

支持 Python3、JavaScript、Shell、Typescript 的定时任务管理平台

Timed task management platform supporting Python3, JavaScript, Shell, Typescript

npm version docker pulls docker stars docker image size

Demo / Issues / Telegram Channel / Buy Me a Coffee

演示 / 反馈 / Telegram 频道 / 打赏开发者

cover

功能

  • 支持多种脚本语言(python3、javaScript、shell、typescript)
  • 支持在线管理脚本、环境变量、配置文件
  • 支持在线查看任务日志
  • 支持秒级任务设置
  • 支持系统级通知
  • 支持暗黑模式
  • 支持手机端操作

版本

docker

latest 镜像是基于 alpine 构建,debian 镜像是基于 debian-slim 构建。如果需要使用 alpine 不支持的依赖,建议使用 debian 镜像

docker pull whyour/qinglong:latest
docker pull whyour/qinglong:debian

npm

npm 版本支持 debian/ubuntu/centos/alpine 系统,需要自行安装 node/python3

npm i @whyour/qinglong

内置命令

  • task
# 依次执行,如果设置了随机延迟,将随机延迟一定秒数
task <file_path>                                             
# 依次执行,无论是否设置了随机延迟,均立即运行,前台会输出日,同时记录在日志文件中
task <file_path> now                                         
# 并发执行,无论是否设置了随机延迟,均立即运行,前台不产生日,直接记录在日志文件中,且可指定账号执行
task <file_path> conc <env_name> <account_number>(可选的) 
# 指定账号执行,无论是否设置了随机延迟,均立即运行 
task <file_path> desi <env_name> <account_number>      
# 设置任务超时时间   
task -m <max_time> <file_path>
# 使用 -- 分割,-- 后面的参数会传给脚本,下面的例子,脚本就可接收到参数 -u whyour -p password
task <file_path> -- -u whyour -p password
  • ql
# 更新并重启青龙
ql update
# 运行自定义脚本extra.sh
ql extra
# 添加单个脚本文件
ql raw <file_url>
# 添加单个仓库的指定脚本
ql repo <repo_url> <whitelist> <blacklist> <dependence> <branch> <extensions>
# 删除旧日志
ql rmlog <days>
# 启动tg-bot
ql bot
# 检测青龙环境并修复
ql check
# 重置登录错误次数
ql resetlet                                                  
# 禁用两步登录
ql resettfa

| 参数 | 说明 | |------------|---------------------------------------------------------------------------------------------| | file_url | 脚本地址 | | repo_url | 仓库地址 | | whitelist | 拉取仓库时的白名单,即就是需要拉取的脚本的路径包含的字符串,多个竖线分割 | | blacklist | 拉取仓库时的黑名单,即就是需要拉取的脚本的路径不包含的字符串,多个竖线分割 | | dependence | 拉取仓库需要的依赖文件,会直接从仓库拷贝到scripts下的仓库目录,不受黑名单影响,多个竖线分割 | | extensions | 拉取仓库的文件后缀,多个竖线分割 | | branch | 拉取仓库的分支 | | days | 需要保留的日志的天数 | | file_path | 任务执行时的文件路径 |

部署

docker (推荐)

# curl -sSL get.docker.com | sh
docker run -dit \
  -v $PWD/ql/data:/ql/data \
  # 冒号后面的 5700 为默认端口,如果设置了 QlPort, 需要跟 QlPort 保持一致
  -p 5700:5700 \
  # 部署路径非必须,比如 /test
  -e QlBaseUrl="/" \
  # 部署端口非必须,当使用 host 模式时,可以设置服务启动后的端口,默认 5700
  -e QlPort="5700" \
  --name qinglong \
  --hostname qinglong \
  --restart unless-stopped \
  whyour/qinglong:latest

docker-compose (推荐)

#  curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
mkdir qinglong
wget https://raw.githubusercontent.com/whyour/qinglong/master/docker/docker-compose.yml

# 启动
docker-compose up -d
# 停止
docker-compose down

podman (推荐)

# https://podman.io/getting-started/installation
podman run -dit \
  --network bridge \
  -v $PWD/ql/data:/ql/data \
  # 冒号后面的 5700 为默认端口,如果设置了 QlPort, 需要跟 QlPort 保持一致
  -p 5700:5700 \
  # 部署路径非必须,比如 /test
  -e QlBaseUrl="/" \
  # 部署端口非必须,当使用 host 模式时,可以设置服务启动后的端口,默认 5700
  -e QlPort="5700" \
  --name qinglong \
  --hostname qinglong \
  docker.io/whyour/qinglong:latest

本机

建议使用纯净系统安装,避免系统原有数据丢失,需要自己安装 node/npm/python3/pip3

# Debian/Ubuntu
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
# Centos
curl --silent --location https://rpm.nodesource.com/setup_20.x | sudo bash
npm install -g node-pre-gyp [email protected]
npm install -g @whyour/qinglong
qinglong
# 根据提示增加环境变量 QL_DIR 和 QL_DATA_DIR
export QL_DIR=""
export QL_DATA_DIR=""
# 再次执行
qinglong

开发

$ git clone https://github.com/whyour/qinglong.git
$ cd qinglong
$ cp .env.example .env
# 推荐使用 pnpm https://pnpm.io/zh/installation
$ npm install -g [email protected]
$ pnpm install
$ pnpm start

打开你的浏览器,访问 http://127.0.0.1:5700

链接

名称来源

青龙,又名苍龙,在中国传统文化中是四象之一、天之四灵之一,根据五行学说,它是代表东方的灵兽,为青色的龙,五行属木,代表的季节是春季,八卦主震。苍龙与应龙一样,都是身具羽翼。《张果星宗》称“又有辅翼,方为真龙”。

《后汉书·律历志下》记载:日周于天,一寒一暑,四时备成,万物毕改,摄提迁次,青龙移辰,谓之岁。

在中国二十八宿中,青龙是东方七宿(角、亢、氐、房、心、尾、箕)的总称。 在早期星宿信仰中,祂是最尊贵的天神。 但被道教信仰吸纳入其神系后,神格大跌,道教将其称为“孟章”,在不同的道经中有“帝君”、“圣将”、“神将”和“捕鬼将”等称呼,与白虎监兵神君一起,是道教的护卫天神。