API request by scheduling execution of Cloudflare worker - Stack Overflow

I'm trying to get data from bybit by making an API request every 2 minutes with the scheduled exec

I'm trying to get data from bybit by making an API request every 2 minutes with the scheduled execution of Cloudflare worker. The problem here is that when I make a request manually, the data is retrieved correctly, but when it's executed automatically, a 403 error occurs. I don't know what I'm missing.

Let me share my code.

export default {
  // ✅ 자동 실행 (2분마다 실행)
  async scheduled(event, env) {
    console.log("⏰ [자동 실행] 2분마다 실행 중...");
    await fetchBybitData(env, "scheduled");
  },

  // ✅ 수동 실행 (Cloudflare Workers에서 직접 호출)
  async fetch(request, env) {
    console.log("

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744205696a4563092.html

相关推荐

  • API request by scheduling execution of Cloudflare worker - Stack Overflow

    I'm trying to get data from bybit by making an API request every 2 minutes with the scheduled exec

    8天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信