0

I am working on a .net project and I have an api endpoint that triggers some messages to be sent.

I need to give the user an option to schedule this event, for example to let a user to choose that the messages will be sent today at 17:30.

What is the best way to perform such a thing, I have looked online but couldn't find an answer.

Thanks.

Ozure
  • 115
  • 2
  • 8
  • can you give examples of what you have looked online? – Felix Sep 16 '21 at 22:13
  • Does this answer your question? [Proper way to schedule a task daily in C# .NET web application](https://stackoverflow.com/questions/38440098/proper-way-to-schedule-a-task-daily-in-c-sharp-net-web-application) – quaabaam Sep 16 '21 at 22:14
  • Hint: You'll be much happier in the long run if you store all dates and times in UTC and convert to whatever the local time zone is only in the presentation layer. Much, much, happier. You may also want to look at Noda Time: https://nodatime.org/ – Flydog57 Sep 16 '21 at 22:20
  • You might want to check out https://www.hangfire.io/ for scheduling / managing tasks – Jonathan Sep 16 '21 at 22:44
  • You can use Corn expressions to set up scheduled tasks, such as "0 30 17? * *", which means that the task is triggered at 17.30 every day. For more usage, please refer to: https://www.quartz-scheduler.net/documentation/ quartz-3.x/tutorial/crontriggers.html#example-cron-expressions – Tupac Sep 17 '21 at 07:17

0 Answers0