Issues When Checking if a job exist using Monitoring API

Hi,

I’m currently implementing to be used with Hangfire, I want to be able to check for the existance of a job, I’m currently creating the job using the following code:

RecurringJob.AddOrUpdate(HangfireJobName, () => DoWork(hangfireResources), cronExpression);

I’ve tried using the following code to get the job:

var monitoringApi = JobStorage.Current.GetMonitoringApi();
var queue = monitoringApi.ScheduledJobs(0, 10);

But this comes back empty, I’ve also replace the “var queue” line with the following:

var job = monitoringApi.JobDetails(HangfireJobName);

But this causes this exception:

Error converting data type nvarchar to bigint.

I’d just like to check the existance of a job (without going through the database).

Any help would be appreciated, thank you.

Sorry to nudge an old topic, however, I was wondering if anyone had any insight as to the aforementioned issues above?

Bump on this, as also running into it. The job ids we are returned are guids

Hi.
Anyone still aving this issue?

var job = monitoringApi.JobDetails(HangfireJobName);
This causes this exception:
Error converting data type nvarchar to bigint.

Thanks