I use Hangfire to read files from FTP server and I have multiple server instances to read from FTP. I need the recurring job only trigger on one instance to prevent the same job to read from same file.
var jobId = BackgroundJob.Enqueue<FtpImageJob>(j => j.ExecuteAsync(null, device.NumericId, device.DeviceId, device.VehicleId, device.TenantId));
BackgroundJob.ContinueJobWith<FtpDeleteJob>(jobId, j => j.ExecuteAsync(null, numericId), JobContinuationOptions.OnAnyFinishedState);