Dinamic schedules in adonis #1581
Unanswered
AndreyViktor
asked this question in
Help
Replies: 1 comment
-
Does Alternatively, there is adonis-bull !? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello, I am trying to schedule tasks for each new register in the database, these tasks should run at a specific time that i will receive from the http request.
I tried doing that using events and node-schedule, at the moment I create a new item, it triggers an event and the event is set to the specific time, but it is not working, I mean, it just doesnt run the code when it reaches the time to it.
I also searched for adonis-schedule but cant figure it out how to run this in that way.
here is my code for the event:
const Event = use('Event')
const {parseISO, isBefore, subHours} = require('date-fns')
const schedule = require('node-schedule')
Event.on('new::auction', async (auction)=>{
const endTime =auction.dt_end
})
any idea on how to create those tasks in adonis?
thanks.
Beta Was this translation helpful? Give feedback.
All reactions