Allow for cron to include seconds

Tags: #<Tag:0x00007f75994cb998>


The current Cron library in use allows for seconds as a 6th item. Would love to see the option to include seconds in cron statements officially.


Hey tracstarr have I misunderstood you, or are you saving there is currently a way to schedule a job in Hangfire to run every x seconds?

If there is could you explain how?


Not directly using cron right now, now. Although the underlying library does/did allow for seconds. But if i’m not mistaken it’s not in use anymore.

The only way to run every x seconds is to start a scheduled job and have it either wait or kick off a new scheduled job in x seconds.


In my opinion, having a job running every few seconds is totally unreasonable.

First, it is beyond throttler’s resolution, so it will never follow the exact schedule.

Second, it would produce a huge storage overhead because of lots of records inserted and distributed locks’ acquisition.


In the enterprise world, that’s a very legitimate use case. I’m not saying I’d design a system that way when we have so many ways of making reactive apps now, but it’s absolutely a thing.


My application needs to poll new events from external service. We need to do it often, e.g. every 10 sec( but it should be configurable). Can I use Hangfire (and Cron expressions) for this?