you can manually call the scheduled handler from a fetch event, ex: ```js if (newurl.pathname ===

you can manually call the scheduled handler from a fetch event, ex:
   if (newurl.pathname === "/supersecretfetchmetotriggercron" && request.headers.has("APIKEY") && request.headers.get("APIKEY") === env.CRONAPIKEY) {
// if you're using any properties of the event like cron/etc you can recreate it instead of passing null
      await this.scheduled(null, env, ctx);
      return new Response("ok - triggered");
    }
Was this page helpful?