Skip to content

Coravel Cron Not running at specific time #287

Answered by jamesmh
jsebastianmr asked this question in Q&A
Discussion options

You must be logged in to vote

That looks correct... why don't you try to use the global error handling: https://docs.coravel.net/Scheduler/#global-error-handling

I think the following would work:

            providerCoravel.UseScheduler(scheduler =>
            {
                scheduler
                .Schedule<Notification>()
                .Cron("30 20 * * *");
            })
            .OnError(exception => throw exception);

Or just write the exception to the console. Normally errors are ignored to fail gracefully, but here with the OnError method you can be more specific about what happens when an exception occurs.

You might find that there's a missing DI registration or something.

Let me know if that helps …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jsebastianmr
Comment options

@jamesmh
Comment options

@jsebastianmr
Comment options

@jamesmh
Comment options

Answer selected by jamesmh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants