Hangfire icon indicating copy to clipboard operation
Hangfire copied to clipboard

Update Cron.cs - MinuteInterval & HourInterval

Open staviloglu opened this issue 3 years ago • 3 comments

Updated MinuteInterval & HourInterval methods to make them available (not obselete) again.

Added defensive code against interval value to get rid of the problem described in HangfireIO/Hangfire#1041

@odinserj

Also related: HangfireIO/Hangfire#1054 HangfireIO/Hangfire#1779

staviloglu avatar Nov 24 '22 12:11 staviloglu

Thanks @staviloglu, this is an interesting way of providing the feature while trying to avoid its potential problems. However I still believe that one day there's much better implementation of this with proper intervals based on duration and not on the Cron format, and I believe sometimes it's much better to leave pain points to have more motivation of fixing them in full.

odinserj avatar Nov 25 '22 10:11 odinserj

@odinserj I totally understand you but also know that many people still use these methods even if they are obselete and they may or may not be informed about the issue #1041.

This PR, if they check change-logs or update their version of Hangfire, would inform anyone who uses these methods.

I need to confess that I still want to use those methods with the proper values 😄

Anyway, thanks for your time and this awesome library, keep up the good work.

staviloglu avatar Dec 01 '22 08:12 staviloglu

Well, there's always this library: https://github.com/schyntax/cs-schyntax

Used this many years ago and loved the system. It is ported to various languages, all based on Schyntax: https://github.com/schyntax

Spiralis avatar Dec 03 '24 15:12 Spiralis