1

I'm new to C#, so apologies if this question is too simple. But I'm trying to create an app (for other users) in Winforms (or any other UI framework) that allows the user to schedule certain tasks, and these scheduled tasks should run after the user closes the window or restarts their computer. I plan on using Quartz.NET to schedule.

Is this doable, and if so, how?

From what I have seen (e.g. here and here), it seems doable, although I'm concerned these pieces of advice are outdated.

Also, can you point me to some beginner tutorials other than the ones on the quartz-scheduler.net? Quartz.NET seems to be quite niche, so I'm not seeing many sources.

Many thanks.

Elon Obama
  • 29
  • 6

1 Answers1

0

Quartz.NET seems to be fine for your use case. Also, there is another library called HangFire. It too serves your purpose and has very good codes sample elaborations and good community support. I recommend using one of the above two. For

HangFire refers there official documentation here

For sample code snippets refer to Hangfire official tutorials here

If you plan to use Quartz.NET :

You can use their official documentation here

Selaka Nanayakkara
  • 3,296
  • 1
  • 22
  • 42
  • Thanks @SelakaN. Do you know how I can implement an AdoJobStore? The Quartz.NET documentation [here](https://www.quartz-scheduler.net/documentation/quartz-3.x/tutorial/job-stores.html) contains lines of code, but it doesn't show how these lines fit into the broader code base. – Elon Obama Jul 16 '23 at 13:25
  • Im not aware of adojobstore. You can start off from the quick start and go ahead from there https://www.quartz-scheduler.net/documentation/quartz-3.x/quick-start.html#fluent-scheduler-builder-api – Selaka Nanayakkara Jul 16 '23 at 13:49
  • Appreciate if you can give an upvote or mark it as correct if it serves the purpose. – Selaka Nanayakkara Jul 16 '23 at 13:50
  • Hi @SelakaN I'd live to upvote but I'm not able to yet. The quick start does not help in this situation unfortunately. If you look at https://www.quartz-scheduler.net/documentation/quartz-3.x/tutorial/job-stores.html#configuring-quartz-to-use-jobstoretx, you see code like `quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz`, but that's nowhere to be found in the Quick Start. Perhaps you know of other sample code that uses AdoJobStore? – Elon Obama Jul 16 '23 at 17:04
  • I assume that beforehand, I need to download ADO.NET and connect to my server. Is that right? – Elon Obama Jul 16 '23 at 17:09
  • Yes you are right – Selaka Nanayakkara Jul 16 '23 at 17:31
  • Man, I'm so confused. I've made an SQLite database, and I've also installed System.Data.SQLite.Core in Visual Studio. Do I also need to install SQLite or include sqlite3.dll? Do I still need to install ADO.NET. Now I'm not sure what all of these do. I've seen that System.Data.SQLite.Core is a provider to ADO.NET, but I've also seen that it's an implementation of ADO.NET. – Elon Obama Jul 18 '23 at 10:56
  • Thank you @SelakaNanayakkara for your assistance so far. I've posted a follow-up [here](https://stackoverflow.com/questions/76940617/how-can-i-prevent-my-desktop-app-from-making-duplicates-of-a-hosted-service), and if you know the answer that would be amazing - if not, that's fine. – Elon Obama Aug 20 '23 at 17:39