Cron in Workers

Hi guys, I am wondering is it possible to extend the timout when running cron in workers? I am using the paid $5 plan and it seems like the timeout is only increase 15s from 15 to 30s, am i doing something wrong or is there anything that i can do with the timeout?
4 Replies
James
James3mo ago
the real question is why do you need a worker waiting so long
diapica
diapicaOP3mo ago
it fetching a lot of data weekly, and since the data is a lot, it may take more than 15s - 1 minute
James
James3mo ago
if its so much data, good chance you can run into OOM errors, but you do get 15 minutes of CPU time for cron triggered workers.
Chaika
Chaika3mo ago
Cron workers have 15 minutes of duration
15 min duration limit for Cron Triggers, Durable Object Alarms and Queue Consumers
cpu time (which doesn't include fetch time/i/o):
You can get more time if you use a more infrequent schedule Scheduled Workers (Cron Triggers) have different limits on CPU time based on the schedule interval. When the schedule interval is less than 1 hour, a Scheduled Worker may run for up to 30 seconds. When the schedule interval is more than 1 hour, a scheduled Worker may run for up to 15 minutes. https://developers.cloudflare.com/workers/platform/limits/

Did you find this page helpful?