Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supportcronjob #9

Closed
wants to merge 12 commits into from
Closed

Supportcronjob #9

wants to merge 12 commits into from

Conversation

zizifn
Copy link
Owner

@zizifn zizifn commented Feb 15, 2022

增加如下功能

  1. 每天北京时间2:00AM stop app
  2. 每天北京时间5:00AM start app

以上功能必须在 auto-start-stop 为true下工作。

env:
  auto-start-stop: true

@zizifn zizifn linked an issue Feb 15, 2022 that may be closed by this pull request
@zizifn
Copy link
Owner Author

zizifn commented Feb 15, 2022

@honeyshine75 请帮忙review下?然后我再 feature branch 实验,等到明天2点和5点,看工作是否正常吧。 等完全正常后,在更新 readme。。

@zizifn zizifn linked an issue Feb 15, 2022 that may be closed by this pull request
@honeyshine75
Copy link

cron我以前没用过,但代码逻辑看着没问题。
不过每天停3h的话也只能用26天,只能说多苟了几天

@zizifn
Copy link
Owner Author

zizifn commented Feb 16, 2022

让我把启动时间弄成6点,这样每天停4个小时。。。

虽然不够,但是我感觉可以赌一把,因为
https://devcenter.heroku.com/articles/free-dyno-hours#dyno-sleeping

If an app has a free web dyno, and that dyno receives no web traffic in a 30-minute period, it will sleep. In addition to the web dyno sleeping, the worker dyno (if present) will also sleep.

Free web dynos do not consume free dyno hours while sleeping.

@zizifn
Copy link
Owner Author

zizifn commented Feb 16, 2022

算了,从北京时间 1:30~6:30 am 吧。

@zizifn zizifn temporarily deployed to v2rayzizi2 February 16, 2022 03:05 Inactive
@honeyshine75
Copy link

先试试手机耗电是否会增加再合入master,Android手机连不上Google可能会耗电增加。

@zizifn
Copy link
Owner Author

zizifn commented Feb 16, 2022

然而现实是,cron job 只能在base branch 工作。
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule

Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes.

我一时想不起来,我github 小号的密码了。。

@zizifn zizifn closed this Jun 7, 2022
@zizifn zizifn deleted the supportcronjob branch December 17, 2022 18:26
@zizifn zizifn restored the supportcronjob branch December 17, 2022 18:26
@deno-deploy deno-deploy bot temporarily deployed to Preview December 17, 2022 18:26 Inactive
@zizifn zizifn deleted the supportcronjob branch December 17, 2022 18:27
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 14, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c17ceb8
Status:🚫  Build failed.

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

加上heroku的自动切换功能吧
2 participants