You'd want to add a heartbeat request every <60s in order to keep the browser alive to avoid startin
You'd want to add a heartbeat request every <60s in order to keep the browser alive to avoid starting new ones. Crazy.

/cfrole command to get the cloudflare employee role 

browser.close() linethis.browser.isConnected()), and reinstantiate it if notstate.blockConcurrencyWhile() may be the answer, but I haven't tested it yet
We’ve spoken to many customers deploying a Puppeteer service on their own infrastructure, on public cloud containers or functions or using managed services. The common theme that we’ve heard is that these services are costly – costly to maintain and expensive to run.

async scheduled(
event: ScheduledEvent,
env: Env,
ctx: ExecutionContext
): Promise<void> {
const urls = [
"https://agenty.com",
];
const browser = await puppeteer.launch(env.MYBROWSER);
await screenshot(
browser,
urls,
env
);
await browser.close();
}, /cfrole