The .NET Core CLI comes with tons of pre-built project templates! One of the new templates that will be included with .NET Core 3 will be for build...
For further actions, you may consider blocking this person and/or reporting abuse
I really like the concept of Invocables! It keeps the code clean.
For scheduling I've always used hangfire, which works really well, but things can get messy really fast since scheduling in hangfire works with anonymous method invocation
Is there a way to update/cancel a scheduled task with Coravel (like in the above example where a
jobId
is returned?In my side project I'm currently using hangfire, but Coravel looks a lot cleaner and I've already wondered how I can clean up these hangfire invocations.
Hangfire is def the defacto right now. Coravel was never built as a direct alternative, but many have pointed out that it's much easier to use.
Also, Coravel supports true async jobs, whereas Hangfire doesn't actually support true async jobs. So all that I/O in your background jobs will actually block your threads 🤪.
See here for more
So, the answer to your question is "yes and no". There's an open issue here that I have on the todo list.
I offered a temporary/potential solution for now in that issue. Basically, you would just manage the tasks in a collection yourself. Coravel gives you some lower-level methods to start/stop any jobs you want (although, it's a workaround of sorts until there is an actual feature added 😂).
You should check out builtwithdot.net/ - it's a showcase of projects built with .NET. You can filter the results by using the first filter on the top left to limit it to .NET Core.
Interesting!
We've always used Window's Task Scheduler for our CRON jobs.
This seems like an interesting alternative, and allows more control at the application level. But comparatively in our current configuration, to change the time of day or enabled/disabled status, we don't have to deploy a new version of the application to PROD, just change it in the task scheduler.
The Pro dashboard seems a lot more user friendly way of dealing with the tasks too, and wouldn't require as many user permissions.
Thanks for the tutorial
Thanks for the feedback!
One of the issues it seems many devs run into with Window's task scheduler are, as you said, basic user permissions 😂.
Plus, if you want to move all your infrastructure to serverless / container services, etc. then with something like Coravel you literally have nothing to change. Using Windows Task Scheduler def. couples you to using a full VM or bare-metal infra.
And yes, Coravel Pro stores all the schedules in your DB so you can just change schedules on PROD with no deployments 👍
.NET Core 3 will have lots of cool stuff! Looking forward to it.
Thanks for creating this beautiful solution. This is the future. Mailer, events and queue? This is really amazing!!!
Thanks!
Seams like something I can use in my next project!, nice work :)
Do you have any recommendations on how to implement this with logging with a database for .net core 3?
I think you can inject
ILogger<T>
into any class you want when using the built-in DI system.For a database, you could use something like Dapper or integrate EF core into the library (this article might help)?
Great article just what I needed! Thank you!
Thanks!
Great article! Thanks for writing it!