简体   繁体   English

C#中的长时间调度程序

[英]Long time scheduler in C#

I'm trying to create a project with net core 2.0. 我正在尝试使用Net Core 2.0创建一个项目。 Users can create reminders in distant future in my system (the reminder call weapi method in distant future). 用户可以在我的系统中创建遥远的提醒(遥远的提醒调用weapi方法)。 Reminders save in database (I choose the database now). 提醒保存在数据库中(我现在选择数据库)。 Nuget-package Quartz.NET can create reminders in future. Nuget软件包Quartz.NET将来可以创建提醒。 But what if server will be restarted? 但是,如果服务器将重新启动怎么办?
The main idea is : in startup.cs recreate reminders in Quartz.NET. 主要思想是:在startup.cs中重新创建Quartz.NET中的提醒。 I don't like this idea, because maybe there will be a lot of reminders. 我不喜欢这个主意,因为也许会有很多提醒。 Have you got any ideas about how can I do it? 您对我该怎么做有任何想法吗?

Quatrz.net allows you to choose JobStore , so you can restore all your jobs after application restart. Quatrz.net允许您选择JobStore ,因此您可以在应用程序重新启动后还原所有作业。 Another alternative is to use Hangfire which provides a lot of persistence options out of the box. 另一种选择是使用Hangfire ,它提供了许多现成的持久性选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM