Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where can I define my Bull.add() functions to schedule daily cron tasks? #65

Closed
LeCoupa opened this issue Jan 29, 2021 · 1 comment
Closed

Comments

@LeCoupa
Copy link
Contributor

LeCoupa commented Jan 29, 2021

Thanks again for the migration to Adonis5. :)

I am wondering where I can set up my job tasks that should occur daily. Something that should happen when the Adonis server has started.

import Bull from '@ioc:Rocketseat/Bull'

Bull.add('MyJobKey', {}, { repeat: { cron: "0 30 12 * * WED,FRI" })

If you have any idea. In the past, I was using an Igniter hook but I don't know if there is an equivalent for Adonis 5 :)

@LeCoupa
Copy link
Contributor Author

LeCoupa commented Jan 30, 2021

FYI, the best is to use a provider :)

adonisjs/core#2188 (comment)

@LeCoupa LeCoupa closed this as completed Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants