Best practice for delayed execution of messages

I am trying to use SqsMqServer to implement delayed processing of messages. More specific, sending emails, but at a specific time in the future.
Is this something I could do with the IMessageService?
The idea would be that the queue is read but not acknowledged based upon a property in the DTO.
However, I don’t see a way of doing this with the implementation of the service for the DTO. I just reads it, it is moved out of the queue. Any better suggestions? - or do I have to use something like Quartz?

I recommend using Background MQ to send emails, there’s an example of sending in the docs:

This is what uses to send emails, all the source and additional docs are available from its GitHub project:

Ok thanks, I checked this, but all mails are sent directly. So I assume there is no way to schedule a message to be picked up at a specific time in the future?

We use hangfire for this scenario. It is trivial to create a hangfire jobactivator to work with Servicestack and then you can do something like:


No there’s no real way to schedule a task at a specific time, you could create a one-shot C# Timer but that’s fragile the further away the time is and requires resources for each Timer.

I’d be doing something like specifying the date when saving the email to the database which is checked by a regular timer interval and sent when elapsed.