coravel icon indicating copy to clipboard operation
coravel copied to clipboard

remove schedule/multiple schedules per IInvocable

Open schmitch opened this issue 4 years ago • 2 comments

Describe the solution you'd like currently we often update our jobs to use a different time, is there any way to actually reconfigure the time a IInvocable does run? Also if I schedule a IInvocable twice, can the time be different?

schmitch avatar Feb 27 '20 10:02 schmitch

At the moment we use something like that:

            (_scheduler as Scheduler)?.TryUnschedule($"backup-job-{backupJob.Id}");
            _scheduler
                .ScheduleWithParams<BackupServiceJobBase>(backupJob.Id)
                .Cron(cron)
                .PreventOverlapping($"backup-job-{backupJob.Id}");

schmitch avatar Feb 27 '20 10:02 schmitch

Question 1: There is not currently a way to change the scheduled time but that can be a new feature request.

Question 2: If you schedule an invocable twice, using a different schedule, then you can make each schedule completely different.

If your invocables are configured as transient or scoped, each schedule will get their own instance of the invocable.

jamesmh avatar Feb 27 '20 13:02 jamesmh