What Cron format does Hangfire support

I’m trying to use Hangfire in a production app. Basically, I read an XML file, and create Recurring jobs based on the file.

So the job looks like this.

<Job name="Export Holdings" cron="* * * * * *" starttime="" timezoneid=""/>

I schedule the job like this:

 RecurringJob.AddOrUpdate(() => jobToSchedule.Run(), cronExp);

Where cronExp = “* * * * * *”

I thought ****** was a pretty basic cron format, but Hangfire throws an exception stating that the cron format is invalid.

Never mind, I figured out the problem. Too many asterisks.


1 Like

Yeah, documentation should tell more about supported format.