Hey there - is there any straight forward way to s...
# sst
c
Hey there - is there any straight forward way to set up delayed jobs that can run at a specific time (instead of a cron job or immediate queue)? I'm thinking of something like repeater or quirrel (no longer supported) Use case: schedule a (blog/social) post to publish in the future at an exact time/date. From what I have been reading it may be possible with aws step functions "wait" state. I wonder if this would be a valid use case to include in an SST construct?
a
There are a lot of blogs of AWS architects coming up with various means of doing this. There's nothing ready made - usually involves some mixed use of scheduled events, step functions, lambdas, SQS (with delays) and/or DynamoDB. Google and you'll find a lot of approaches.
c
I guess that's part of my thinking though. Since the purpose of SST is to make it easy to build serverless applications, and delayed jobs usually require a mix of several things stitched together, it sounds like a good candidate to simplify into a construct.
a
My concern is that every technique has different trade-offs, so which one do you choose for a construct? What I love about SST is that it is built upon CDK; look for constructs there. This gets close, giving you scheduled jobs down to seconds. Here's some others to check out.
d
Adam is spot on, but I always thought this implementation (no constructs, simplest, but limited) was interesting
f
Thanks for the input guys! Opened an issue to gauge interest for a “delayed job” construct. https://github.com/serverless-stack/serverless-stack/issues/1691