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

Should be able to specify seconds in RecurringJobScheduler #167

Closed
sgrassie opened this issue Jul 17, 2014 · 19 comments
Closed

Should be able to specify seconds in RecurringJobScheduler #167

sgrassie opened this issue Jul 17, 2014 · 19 comments

Comments

@sgrassie
Copy link
Contributor

The RecurringJobScheduler should be able to set a job to reoccur every X seconds.

There is support for this in NCrontab see #7, although a build has not yet been released.

I think it would involve making a change here, such that CrontabSchedule.Parse takes a second options argument, where you specify that you want to recognise six-part crontab expressions.

@Caldas
Copy link

Caldas commented Aug 6, 2014

This would be great 👍

@odinserj
Copy link
Member

Unfortunately, that change is proposed to be included in 2.0 version only (it hasn't released yet). I asked @atifaziz about his plans to release it here, so let's wait for the answer.

In case of unresolved conversation, we can fork the project and make the NCrontab2 package, but let's wait first.

@odinserj
Copy link
Member

NCrontab 2.0 released! Now we need to prepare Hangfire's RecurringJobScheduler, because it wakes up only every minute now. And there should be some caching mechanism, because it is terrible to query job storage every one second.

@sgrassie
Copy link
Contributor Author

Good that it has been released. And I agree, it would be terrible to query every second. I do need to schedule some jobs to run every 20 seconds, or every 45 seconds.

@odinserj
Copy link
Member

Just curious - what kind of background processing do you want to perform every 20 seconds?

@sgrassie
Copy link
Contributor Author

Emailed you separately about that ㊙️

@odinserj odinserj added this to the 1.1.0 milestone Aug 19, 2014
@Caldas
Copy link

Caldas commented Aug 20, 2014

In my case in will be summarizing data from a ElasticCache and sending it to a Splunk System

@odinserj odinserj modified the milestones: 1.2.0, 1.1.0 Sep 3, 2014
@odinserj odinserj modified the milestones: 1.2.0, 1.2.1 Nov 17, 2014
@bbakkebo
Copy link

bbakkebo commented May 6, 2015

Hi, I am currently testing 1.40, but I cannot see that it was updated. Hangfire works great, but I have one job that needs to run everything 30 seconds..Is there a workaround to this?
Thanks in advance. 👍

@reggiepangilinan
Copy link

Hi @bahram-hodjaev i tested this and this does not work,
this will only run the job once.

any update on this? i have a job that needs to run every 30 seconds.

Thanks in advance :)

@LordMike
Copy link

Is there an update on this?
I'll probably try the Enqueue/Schedule trick, but if Hangfire internally only works in minutes, then that's not gonna work.. :/

@alisherdavronov
Copy link

how about enqueue delayed jobs in every minute? if 5 second granularity needed there will be 30 jobs every minute

@timgaunt
Copy link

This is also something we'd be interested in as the hacks we have in place at the moment are a little hampering

@LeifDC
Copy link

LeifDC commented May 10, 2017

This would be a very useful feature!

@darrenbenn
Copy link

This feature would be awesome!! 👍

@burningice2866
Copy link
Contributor

burningice2866 commented May 10, 2017

@thobanimadonsela
Copy link

Does anyone know when we can expect this release?

@enrico-padovani
Copy link

This is a log awaited feature, we'd use it immediately!

@heithvaldr1
Copy link

Очень жду!

@odinserj
Copy link
Member

Support for seconds implemented in the latest betas of 1.7.0 so you can just pass six-part cron expression and it will work. However, you'll need to tweak the BackgroundJobServerOptions.SchedulePollingInteval option correspondingly to avoid extra delays, because default polling interval is 15 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests