I want to run the scheduler along with the server startup in adonis js. I want to schedule task but don't want to execute it with external command like
adonis run:scheduler
or
node ace run:scheduler
Is there any other way to do so?
I want to run the scheduler along with the server startup in adonis js. I want to schedule task but don't want to execute it with external command like
adonis run:scheduler
or
node ace run:scheduler
Is there any other way to do so?
You can create your own custom command by using ace or register a new script inside package.json
for e.g inside your package.json
script object add this property,
"serve:with-scheduler": "node ace serve & node ace run:scheduler"
and then use below to run simultaneously,
npm run serve:with-scheduler"