• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ligz
V2EX  ›  程序员

白嫖 GitHub 失败,用 action 定时循环发消息到企业微信延时太严重!

  •  
  •   ligz · Sep 28, 2022 · 3759 views
    This topic created in 1528 days ago, the information mentioned may be changed or developed.

    仓库地址: https://github.com/guangzhengli/wecom-notification-action

    在 这个仓库 中,我将企业微信机器人发送消息改造成一个 GitHub action ,想实现一个定时循环发送消息的功能,帮助我每天发送不同的消息到企业微信中,提醒组内的小伙伴主持会议,这个方案实现了,也没有问题。但是没想到 GitHub action 的延迟特别严重,我定时 UTC 00:00 ,在 UTC+8 的时区 10:24AM 才触发。。。

    白嫖方案感觉直接失败,不知道各位大佬有没有好点子。

    jimyag
    jimyag
    Sep 28, 2022
    2
    @jimyag cf 中有一个 corn 定时器,可以尝试一下
    ligz
    ligz
    OP
    Sep 28, 2022
    3
    @jimyag worker 很强,但是貌似无法多人协同管理内容,不过白嫖也要求不了那么多[doge]
    lisongeee
    lisongeee
    Sep 28, 2022
    4
    GitHub action 的定时触发器根本不准,但是 github 提供了 api 让你可以手动触发

    我现在是用 阿里云的函数计算去定时手动触发 GitHub action
    rb6221
    rb6221
    Sep 28, 2022
    6
    这种用法不是违规的吗
    zhuweiyou
    zhuweiyou
    Sep 28, 2022
    7
    阿里云 云函数 有免费额度
    ericgui
    ericgui
    Sep 28, 2022
    8
    github actions 自己都不推荐你把 cron 用于生产,他们自己都放弃治疗了
    ligz
    ligz
    OP
    Sep 28, 2022
    9
    @janus77 哪个条款不建议这么做吗,主要我看类似的 action 一大堆,我 GitHub profile README 也是用类似的 action 做的。
    ligz
    ligz
    OP
    Sep 28, 2022
    10
    @lisongeee 这也是条路子
    GreatAuk
    GreatAuk
    Sep 28, 2022
    11
    我有一个 action 定的是每小时,每个小时确实会触发 ,但不一定是小时内的哪分钟...
    ligz
    ligz
    OP
    Sep 28, 2022
    12
    @GreatAuk 其实一个小时内,我也不是不能接受,这相差 2 个多小时,有点离谱
    cweijan
    cweijan
    Sep 28, 2022
    13
    用 github action 做 cron, 白嫖到这份上挺丢人的
    duzhor
    duzhor
    Sep 28, 2022
    14
    你这白票的有点离谱,建议用华为云函数定时触发
    ligz
    ligz
    OP
    Sep 28, 2022
    15
    @cweijan 现在论坛戾气这么重吗,我只想讨论一个技术方案,不知道哪里冒犯到你了
    liuguang
    liuguang
    Sep 28, 2022
    16
    你这样是滥用,小心被 GitHub 封禁 Action 功能
    2123123
    2123123
    Sep 28, 2022
    17
    确实是有条款规定的
    https://docs.github.com/en/site-policy/github-terms/github-terms-for-additional-products-and-features#actions
    其中:
    if using GitHub-hosted runners, any other activity unrelated to the production, testing, deployment, or publication of the software project associated with the repository where GitHub Actions are used.
    像一些签到脚本被 ban 的几率也很大,建议使用阿里云函数计算
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1033 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 19:12 · PVG 03:12 · LAX 11:12 · JFK 14:12
    ♥ Do have faith in what you're doing.