Hi,
Had kept a post here but was closed due to age.
Again posting one for help.
Please refer below.
Is there any way to push the bot to message the user o a particular time of the day?
so that bot sends hi to the user. or any internal clock?
Several people suggested Quartz.net , Hangfire, Azure web jobs. But no one told me how to.
Please provide a working code segment.
We have a "proactive" azure bot template you might want to look at:
https://docs.botframework.com/en-us/azure-bot-service/templates/proactive/#navtitle
@willportnoy am checking that now, but am confused how can we trigger it at a time? are there no simpler implementations?
Hi @alokraj68,
you can use the template linked by @willportnoy AND the solutions suggested by "other people". You can probably create a Quartz.net (or Hangfire or Azure web) job that triggers every X minute and "push" the message when your condition are matched.
There's no simpler implementation. At least not in the Bot Framework SDK.
@gioffyx I did try hangfire but failed with it. and the template @willportnoy linked seems of another type. I saw many bots that match my requirement but could not find any place where this requirement is addressed
Hi @alokraj68,
If you want the push message (from a timer, etc.) to come in through your bot's messaging endpoint, the sample that @willportnoy linked is the simplest path.
You can build your own webhook system to call a different endpoint on your bot. We don't have a sample for this because there's nothing specific to bots. Simply create a webhook callback, add an appropriate security mode, and configure your external system to call it.
Hi @alokraj68,
here's a possible way of doing what you want:
If you start from the proactive bot template you'll get some pieces of this solution, that you can change accordingly.
Changes you will likely need:
Sorry, no code samples, I have not tried it yet.
Hope this all makes sense.
@alokraj68, I've just tried the above and it works, so I'm closing this issue. I'll see if I can find time to write a blog post with code samples. If so, I'll post the link here. Feel free to reopen this if you still have issues. Thanks!
@Andrea-Orimoto It would be really great if you could write a blog post on the same. many like me are waiting for that. thank you for finding a solution.