예제 #1
0
        private void DeleteRecurringJob(RunHangfireWorkflowDefinitionJobModel data)
        {
            var identity = data.GetIdentity();

            _recurringJobManager.RemoveIfExists(identity);
        }
예제 #2
0
        private void ScheduleRecurringJob(RunHangfireWorkflowDefinitionJobModel data, string cronExpression)
        {
            var identity = data.GetIdentity();

            _recurringJobManager.AddOrUpdate <RunHangfireWorkflowDefinitionJob>(identity, job => job.ExecuteAsync(data), cronExpression);
        }