Wait, so you don't actually need the alarm to keep the session open.
Wait, so you don't actually need the alarm to keep the session open.
If users omit the browser.close() statement, it will stay open, ready to be connected to again and re-used but it will, by default, close automatically after 1 minute of inactivity. Users can optionally extend this idle time up to 10 minutes, by using the keep_alive option, set in milliseconds:


browser = await puppeteer.connect(env.MYBROWSER, sessionId); instead of pupeeteer.launch`
puppeteer.sessions(env.YourBrowserBinding) like in this example here https://developers.cloudflare.com/browser-rendering/get-started/reuse-sessions/

browser = await puppeteer.connect(env.MYBROWSER, sessionId);nodejs_compat_v2nodemailerpuppeteer.sessions(env.YourBrowserBinding)[triggers]
crons = ["0 0 * * 0"] # Weekly triggerX [ERROR] A request to the Cloudflare API failed
invalid cron string [code: 10100]new Date().toString()