I'm using Hangfire 1.7.11 and this filter, but I changed the fingerprint format to use a SHA256Hash instead.
protected static string GetFingerprint(Job job)
{
string parameters = string.Empty;
if (job.Args != null)
{
parameters = string.Join(".", job.Args);
}
if (job.Type == null || job.Method == null)
{
return string.Empty;
}
var fingerprint = String.Format(
FingerprintFormat,
job.Type.FullName,
job.Method.Name,
parameters);
return fingerprint.ComputeSHA256Hash();
}
I don't know why hangfire was not executing scheduled jobs. I'm scheduling the job like that:
BackgroundJob.Schedule<Job>(s => s.Execute(Id), TimeSpan.FromMinutes(2));
- My database is a SQL Server Express running on AWS;
- My frontend and backend are in the same server;
- I have a running server.
- The recurring jobs looks like ok;
You can see the problem in the picture below:
EDIT 1
Theses jobs are been scheduled by another application though. Using the same idea:
BackgroundJob.Schedule<Job>(s => s.Execute(Id), TimeSpan.FromMinutes(2));
I have a staging environment using the same database server but on a different database. It works, but for the production one, I have much more jobs to process.
EDIT 2
Yesterday I dropped the database and today it is working well. We are using AWS ECS Fargate and Autoscaling. Sometimes some servers are been adding when necessary. I donĀ“t know if it can be a problem.