dotnet-labs / ServiceWorkerCronJob

Schedule Cron Jobs using HostedService in ASP.NET Core
MIT License
265 stars 71 forks source link

Multiple CronJobs #4

Closed LucasVos closed 4 years ago

LucasVos commented 4 years ago

Hi Chan,

As far as i can tell, the current code base is unable to handle multiple registrations of the same cron object:

services.AddCronJob<MyCronJob>( c=> .... )
services.AddCronJob<MyCronJob>( c=> .... )

This questions was already asked by @markofranjic , but in this case, i'm not able to construct a single cron expression. I have two crons which cannot be simplified to one.

How would you suggest to change the code base to handle multiple cron job entries?

changhuixu commented 4 years ago

@LucasVos , I guess the question is still similar to the issue #3 . In other words, How to execute the same CronJob at multiple schedules. Could you share your schedules here? If in the end, the schedules are hard to construct, then I can improve the code to take a list of cron expressions.

changhuixu commented 4 years ago

close this issue due to age..