Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Crons on Hangfire #2239

Closed
Tracked by #11
bruno-garcia opened this issue Mar 16, 2023 · 11 comments · Fixed by #3128
Closed
Tracked by #11

Support for Crons on Hangfire #2239

bruno-garcia opened this issue Mar 16, 2023 · 11 comments · Fixed by #3128
Assignees
Labels
Feature New feature or request

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Mar 16, 2023

Problem Statement

Crons is in Beta: https://docs.sentry.io/product/crons/

Other SDKs:

Solution Brainstorm

Spec is pending, this can be on hold until then.

@kanadaj already created something for Hangfire (and Quartz) that can be brought in or used as inspiration: https://github.com/kanadaj/Sentry.Monitor

@bruno-garcia bruno-garcia added Feature New feature or request Platform: .NET labels Mar 16, 2023
@mattjohnsonpint
Copy link
Contributor

Hangfire is mostly about fire-and-forget background tasks. We'd be mostly interested their recurrent tasks feature.
https://docs.hangfire.io/en/latest/background-methods/performing-recurrent-tasks.html

We should also look at Quartz.NET, which is primarily aimed at scheduling.

Also, there are several cloud-based schedulers offered by Azure, AWS & GCP - but I think those should be broader initiatives, not specific for .NET.

@mattjohnsonpint mattjohnsonpint changed the title Support for Crons on Hangfire Support for Crons on Hangfire and Quartz.net Mar 16, 2023
@mattjohnsonpint
Copy link
Contributor

Note, this issue mirrors getsentry/sentry#44377

@mattjohnsonpint
Copy link
Contributor

Also, this has already been started externally, by @kanadaj at https://github.com/kanadaj/Sentry.Monitor

@bruno-garcia
Copy link
Member Author

I use it as a recurring job runner on: https://github.com/dotnet/nuget-trends and plan to dogfood there

@bruno-garcia bruno-garcia changed the title Support for Crons on Hangfire and Quartz.net Support for Crons on Hangfire Mar 16, 2023
@bruno-garcia
Copy link
Member Author

Deleted Quartz from the title. Lets scope this to Hangfire only. if there's demand for Quartz we can create another issue and track separately.

@kanadaj
Copy link
Contributor

kanadaj commented Mar 16, 2023

@bruno-garcia My implementation already has both Quartz and Hangfire and seems to work fine unless the API changes for some reason.

@bruno-garcia
Copy link
Member Author

@bruno-garcia My implementation already has both Quartz and Hangfire and seems to work fine unless the API changes for some reason.

Edited the title to note that your code has both and we can talk about moving it in to this repo 🙏 Thanks!

@kanadaj
Copy link
Contributor

kanadaj commented Mar 16, 2023

This was discussed on Discord, but for recordkeeping: if we want to make these more generic libraries (Sentry.Hangfire and Sentry.Quartz) we'd probably want to also add facilities for tracing the jobs. This could be done for non-recurring jobs too.

@bruno-garcia
Copy link
Member Author

Related to Crons (but not Hangfire, an alternative): https://www.nuget.org/packages/ncrontab

@pinkpawkitty
Copy link

Deleted Quartz from the title. Lets scope this to Hangfire only. if there's demand for Quartz we can create another issue and track separately.

For reference, I'd love to have an implementation for Quartz.

@bruno-garcia
Copy link
Member Author

Deleted Quartz from the title. Lets scope this to Hangfire only. if there's demand for Quartz we can create another issue and track separately.

For reference, I'd love to have an implementation for Quartz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
Status: Done
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants