Question: Is there a way to set hangfire recurring jobs every few seconds?
I do not seek a solution where fire and forget task creates another fire and forget task, and if not, what are suggested alternatives?

Answer: 
Not sure when this became supported but tried this in ASP.NET Core 2.0 with Hangfire 1.7.0. The following code schedules a job every 20 seconds:

```
RecurringJob.AddOrUpdate<SomeJob>(
    x => x.DoWork(),
    "*/20 * * * * *");

```

If I am not mistaken 6 tokens (as opposed to standard 5 tokens) is supported due to Hangfire use of [NCrontab](https://github.com/atifaziz/NCrontab) which allows cron expressions with 6 tokens (second granularity instead of minute granularity).

Hangfire dashboard also nicely shows the small time interval between runs:

[![Hangfire dashboard](https://i.stack.imgur.com/RLeYF.png)](https://i.stack.imgur.com/RLeYF.png)
Although Hangfire doesn't allow you to schedule tasks for less than a minute, you can actually achieve this by having the function recursively scheduling itself; i.e. let's say you want some method to be hit every 2s you can schedule a background job that calls the method on Startup;

```
BackgroundJob.Schedule(() => PublishMessage(), TimeSpan.FromMilliseconds(2000));

```

And then in your PublishMessage method do your stuff and then schedule a job to call the same method;

```
public void PublishMessage()
    {
        /* do your stuff */

        //then schedule a job to exec the same method
        BackgroundJob.Schedule(() => PublishMessage(), TimeSpan.FromMilliseconds(2000));
    }

```

The other thing you need to override is the default SchedulePollingInterval of 15s, otherwise your method will only be hit after every 15s. To do so just pass in an instance of BackgroundJobServerOptions to UseHangfireServer in your startup, like so;

```
var options = new BackgroundJobServerOptions
        {
            SchedulePollingInterval = TimeSpan.FromMilliseconds(2000)
        };

        app.UseHangfireServer(options);

```

I don't know how "foolproof" my solution is, but I managed to achieve my goal with it and everything is "happy" in production.