public Task UnscheduleWorkflowAsync(string?workflowDefinitionId, string?workflowInstanceId, string activityId, string?tenantId, CancellationToken cancellationToken = default)
 {
     _backgroundJobClient.UnscheduleJobWhenAlreadyExists(CreateData(workflowDefinitionId, workflowInstanceId, activityId, tenantId));
     return(Task.CompletedTask);
 }
 public static void ScheduleWorkflow(this IBackgroundJobClient backgroundJobClient, RunHangfireWorkflowJobModel data, DateTimeOffset dateTimeOffset)
 {
     backgroundJobClient.UnscheduleJobWhenAlreadyExists(data);
     backgroundJobClient.Schedule <RunHangfireWorkflowJob>(job => job.ExecuteAsync(data), dateTimeOffset);
 }