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
simpson17mo ago
@sathoro you mentioned a way of doing this before
Ruttvik Kheni
Ruttvik KheniOP17mo ago
@Cloudflare (Server Owner) Is anyone here to guide us? how we can do that.
Harshil Bodara
Harshil Bodara17mo ago
@Cloudflare (Server Owner) is anyone here to help me?
sathoro
sathoro17mo ago
what have you tried? just use DO alarms
Harshil Bodara
Harshil Bodara17mo 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
sathoro16mo ago
that's not how you create a DO... go read the docs for itty-durable
Harshil Bodara
Harshil Bodara16mo ago
can you please give me the docs link or exmaple? Thanks!, for your help now, i think, it is working fine
simpson
simpson16mo ago
Thank you @sathoro !
Ruttvik Kheni
Ruttvik KheniOP15mo 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]

Did you find this page helpful?