Skip to content

Commit

Permalink
5 tasks per user, and more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lgh06 committed Apr 22, 2022
1 parent 0bbc948 commit 66a9d10
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 20 deletions.
6 changes: 3 additions & 3 deletions packages/doc-n-help-site/docs/FAQ/02_free_quota_and_price.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ Points will be added at the next point increase time only after your points are
If you check a page twice a day, you can have enough points for a month.

## Task number and script number limit {#task-n-script-limit}
Each user can create up to 3 different tasks.
Each user can create up to 3 different eraser scripts.
Each user can create up to 5 different tasks.
Each user can create up to 5 different eraser scripts.
See also: [Task execute / Email send strategy](03_task_and_email_strategy.mdx) .


## Price {#price}

Recharge 1 RMB to get 100 points and 1 USD to get 500 points.

## Redeem ways {#redeem-ways}
## Top-up ways {#top-up-ways}
Mainland China users can use WeChat to top up, and overseas users can use Paypal to transfer points manually.
You can check the [top-up page](https://webpagemonitor.net/zh/member/redeem) after logging in for specific information.
15 changes: 12 additions & 3 deletions packages/doc-n-help-site/docs/FAQ/03_task_and_email_strategy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import ImageChanger from "@site/src/components/ImageChanger";

## Task execution strategy {#task-execution-strategy}

### End time for cron (repeated) task's checks
For users with less than or equal to 80 points, the max end time for created tasks is <b>7 days</b> later.
For users with more than 80 points, the max end time for created tasks is <b>30 days</b> later.
The default value of end time input field is <b>7 days</b> later.

### Min intervals between tasks
The minimum interval for timed detection tasks is 10 minutes.
When the above conditions are not met, the Create Task page will give a prompt and the Create Task button will be grayed out and cannot be clicked.
Expand All @@ -14,9 +19,13 @@ When the above conditions are not met, the Create Task page will give a prompt a
<br />
Also, since we need 15 minutes to assign tasks to different servers, the first timed detection task within 15 minutes will be ignored.

### End time for cron (repeated) task's checks
For users with less than or equal to 80 points, the deadline for created tasks is at the latest 7 days later.
For users with more than 80 points, the deadline for created tasks is 30 days later at the latest.

### Time limit for a single detection task
The time limit for a single detection task is <b>7 seconds</b>.
For mostly detection tasks, 7 seconds is a reasonable limit and is perfectly adequate.
If we cannot get the web area's text after that time, an error message is reported as `pptr script timeout`.
You can see the task's err message in the exported csv file on task list page.
If multiple tasks are all time out, please check our contact information in the top-up page for help.


## Email send strategy {#email-send-strategy}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ title: "免费额度、价格与使用限制"
如果一天检测两次,可以足够用一个月。

## 任务与脚本数量限制 {#task-n-script-limit}
每个用户可以创建最多3个不同的任务
每个用户可以创建最多3个不同的橡皮脚本
每个用户可以创建最多5个不同的任务
每个用户可以创建最多5个不同的橡皮脚本
另见:[任务执行/邮件发送策略](03_task_and_email_strategy.mdx)

## 价格 {#price}
充值1人民币可以获得100点数,1美元获得500点数。

## 充值途径{#redeem-ways}
## 充值途径{#top-up-ways}
中国内地用户可以使用微信充值,海外用户可以使用Paypal手动转账。
具体信息可以登录后查看[充值点数](https://monit.or.passby.me/zh/member/redeem)界面。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ title: "任务执行/邮件发送策略"

import ImageChanger from "@site/src/components/ImageChanger";

## 定时检测任务执行策略 {#task-execution-strategy}
## 定时检测任务执行策略 {#task-execution-strategy}

### 定时检测任务的截止时间
点数小于等于80的用户,创建的任务的截止时间最晚为<b>7天</b>后。
点数大于80的用户,创建的任务的截止时间最晚为<b>30天</b>后。
任务截止时间输入框的默认值为<b>7天</b>后。

### 定时检测任务的间隔
定时检测任务的最小间隔为10分钟。
Expand All @@ -15,9 +20,12 @@ import ImageChanger from "@site/src/components/ImageChanger";
<br />
同时, 因为我们需要15分钟来分配任务到不同的服务器,因此在15分钟内的第一个定时检测任务将被忽略。

### 定时检测任务的截止时间
点数小于等于80的用户,创建的任务的截止时间最晚为7天后。
点数大于80的用户,创建的任务的截止时间最晚为30天后。
### 单次检测任务所花费的时间限制
单次检测任务的时间限制为<b>7秒钟</b>。
对于大多是检测任务,7秒钟是一个合理的限制,完全够用。
若超时仍未检测到相应区域的网页文本,则报错的err信息为`pptr script timeout`
您可以在任务列表的导出csv文件中查看任务的err信息。
若多次任务均超时,请在充值页面中查看我们的联系方式,以获取帮助。


## 邮件发送策略 {#email-send-strategy}
Expand Down
4 changes: 2 additions & 2 deletions packages/helper/transRes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ let trans = {
the first repeated task within 15 minutes will be ignored.":
"注意:我们需要15分钟分配任务到不同的服务器。<br/>\
在15分钟内的第一个重复任务将被忽略。",
"Notice: One user can only create max 3 tasks, and lasts max 7 days (30 days if your points > 80) per task.\
"Notice: One user can create max 5 tasks, and lasts max <b>7 days</b> (<b>30 days</b> if your points > 80) per task.\
Minimum interval between two tasks is 10 minutes.":
"注意:一个用户只能创建最多3个任务,每个任务最长持续7天(若点数大于80,则可持续30天)。\
"注意:一个用户可以创建最多5个任务,每个任务最长持续<b>7天</b>(若点数大于80,则可持续<b>30天</b>)。\
两个任务之间的最小间隔为10分钟。",
"Create Now": "立即创建",
"Success. you will be redirected to task list page.\n\
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/pages/api/market/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ async function scriptPostHandler(
let userScriptCount = await db.collection(collectionName).countDocuments({
userId,
});
if( (!_id && userScriptCount >= 3) || (_id && userScriptCount >= 6)){
return res.status(400).json({ err: 'user script count is over 3' })
if( (!_id && userScriptCount >= 5) || (_id && userScriptCount >= 7)){
return res.status(400).json({ err: 'user script count is over 5' })
}
if( String(value).match(/require|import|fetch/g) ){
return res.status(400).json({ err: 'cannot contain "require" / "import" / "fetch" inside eraser script.' })
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/pages/api/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ async function _postHandler(
let userTaskCount = await db.collection("task").countDocuments({
userId,
});
if( (!_id && userTaskCount >= 3) || (_id && userTaskCount >= 6)){
return res.status(400).json({ err: 'user task count is over 3' })
if( (!_id && userTaskCount >= 5) || (_id && userTaskCount >= 7)){
return res.status(400).json({ err: 'user task count is over 5' })
}
return mongo.upsertDoc(db, 'task', filter, newDoc, res, true);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/pages/task/edit_simp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ Also, you can close our page, your task will keep running until `) + taskDetail.
<textarea data-input-index="8" value={taskDetail.extra.eraserArr.join('\n')} onChange={handleInputChange} name="erasers" id="erasers" cols={20} rows={3}></textarea>
</div>
</details>
<div {...innerHTML(t('Notice: One user can only create max 3 tasks, and lasts max 7 days (30 days if your points > 80) per task.\
<div {...innerHTML(t('Notice: One user can create max 5 tasks, and lasts max <b>7 days</b> (<b>30 days</b> if your points > 80) per task.\
Minimum interval between two tasks is 10 minutes.'))}>
</div>
<div {...innerHTML(t('Notice: Simple Mode is only suitable for monitor <b>public web pages</b>,\
Expand Down

0 comments on commit 66a9d10

Please sign in to comment.