CF worker with multiple cron trigger using DO alarm

I want to schedule 7 crons in one worker, but worker have validation, we can schedule only 3 crons in one worker. so, I want, suggestion, can we do this type of functionality using a DO alarms, if yes how we can do that? I read DO alarm docs, its seems like we can integrate alarm in API and we can loop alarm in alarm function. but, for schedule alarms we need to use API for schedule a s. can we automate it like worker cron trigger? cc @simpson2, @harshilbodara, @ruttvikkheni
9 Replies
simpson
simpson15mo ago
@sathoro you mentioned a way of doing this before
Ruttvik Kheni
Ruttvik KheniOP15mo ago
@Cloudflare (Server Owner) Is anyone here to guide us? how we can do that.
Harshil Bodara
Harshil Bodara15mo ago
@Cloudflare (Server Owner) is anyone here to help me?
sathoro
sathoro15mo ago
what have you tried? just use DO alarms
Harshil Bodara
Harshil Bodara15mo ago
I want to do the every create an alarm every 2 seconds and sets the alarm, when, I am calling the water routes but, I am getting an error
No description
No description
No description
sathoro
sathoro15mo ago
that's not how you create a DO... go read the docs for itty-durable
Harshil Bodara
Harshil Bodara15mo ago
can you please give me the docs link or exmaple? Thanks!, for your help now, i think, it is working fine
simpson
simpson15mo ago
Thank you @sathoro !
Ruttvik Kheni
Ruttvik KheniOP13mo ago
@sathoro wrangler deploy --new-class do_class_name command not working can you help me with this, I want to deploy new DO class. but facing error Error: Cannot create binding for class DurableObject that is not exported by the script [API code: 10061]
Want results from more Discord servers?
Add your server