Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lunnlew committed Jan 23, 2021
1 parent 1f0967d commit 3730f11
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

**一个自动执行任务的工具,通过它可以实现账号自动签到,自动领取权益等功能,帮助我们轻松升级。**

**通过结合GitHub Actions,可以实现每天线上自动运行,一劳永逸。**

## bilibili签到任务
**实现现B站帐号的每日自动观看、分享、投币视频,获取经验,每月自动领取会员权益等功能,帮助我们轻松升级会员到Lv6并赚取电池。**

Expand Down Expand Up @@ -153,4 +151,16 @@ docker run \
```

### 注意
#### cron中`%`号需要转义`\%`
#### cron中`%`号需要转义`\%`

### 脚本运行机制
任务并非在一次命令执行时全部执行完毕,任务创建时会根据某个时间段,将所有任务分配到该时间段内的随机的某个时间点,然后使用定时任务定时运行脚本入口,内部子任务的运行时机依赖于任务配置项的运行时间及延迟时间,这种机制意味着,只有当脚本的运行时间在当前定时任务运行时间之前,脚本子任务才有可能有选择的被调度出来运行

### crontab 任务示例
在4-23小时之间每隔三十分钟尝试运行可运行的脚本子任务
```txt
*/30 4-23 * * * /bin/node /workspace/AutoSignMachine/index.js unicom --user 1******5 --password 7****** --appid 1************9
```

### GitHub Actions 运行问题
暂未处理GitHub Actions支持
6 changes: 3 additions & 3 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ if [ ${enable_52pojie} ];then
fi

if [ ${enable_bilibili} ];then
echo "10 13 * * * node /AutoSignMachine/index.js bilibili --cookies ${cookies}" >> /etc/crontabs/root
echo "*/30 7-22 * * * node /AutoSignMachine/index.js bilibili --cookies ${cookies} --username ${username} --password ${password} ${othercfg}" >> /etc/crontabs/root
fi

if [ ${enable_iqiyi} ];then
echo "10 13 * * * node /AutoSignMachine/index.js iqiyi --P00001 ${P00001} --P00PRU ${P00PRU} --QC005 ${QC005} --dfp ${dfp}" >> /etc/crontabs/root
echo "*/30 7-22 * * * node /AutoSignMachine/index.js iqiyi --P00001 ${P00001} --P00PRU ${P00PRU} --QC005 ${QC005} --dfp ${dfp}" >> /etc/crontabs/root
fi

if [ ${enable_unicom} ];then
echo "10 13 * * * node /AutoSignMachine/index.js unicom --cookies ${cookies} --user ${user} --password ${password} --appid ${appid}" >> /etc/crontabs/root
echo "*/30 7-22 * * * node /AutoSignMachine/index.js unicom --cookies ${cookies} --user ${user} --password ${password} --appid ${appid}" >> /etc/crontabs/root
fi

if [ ${enable_10086} ];then
Expand Down

0 comments on commit 3730f11

Please sign in to comment.