Comments (5)
Did you try to run your process on binary mode?
http://pm2.keymetrics.io/docs/usage/process-management/#binary-code-execution
pm2 start ./ace -- scheduler:run
It should work :)
from adonis-scheduler.
I'm not sure if it's the best way to run it, but I added the scheduler to the bootstrap for http before the const Server = use('Adonis/Src/Server')
line.
/*
|--------------------------------------------------------------------------
| Run Scheduler
|--------------------------------------------------------------------------
|
| Run the scheduler on boot of the web sever.
|
*/
const Scheduler = use('Adonis/Addons/Scheduler')
Scheduler.run()
from adonis-scheduler.
My apologies to piggy-back on an old issue. Just wanted to point out that you would now use the following command instead..
pm2 start ./ace -- run:scheduler
You can also see the above when you go to adonis server directory and enter command -
node ace --help
from adonis-scheduler.
Thanks @hoangmy92, that is what I would recommend.
Closing for now, feel free to re-open if there are any issues.
from adonis-scheduler.
Thanks for the command pm2 start ./ace -- run:scheduler
, it works perfect, but I am trying to do the same via the config file. I have tried this in the config but it does not start the app.
{ name : "megsapp-sim-card-process", cwd : "/opt/megsapp-sim-card-process/", script : "./ace", args : "scheduler:run", error_file : "/var/log/megsapp-sim-card-process/error.log", out_file : "/var/log/megsapp-sim-card-process/out.log", }
and
{ name : "megsapp-sim-card-process", cwd : "/opt/megsapp-sim-card-process/", script : "node ace", args : "scheduler:run", error_file : "/var/log/megsapp-sim-card-process/error.log", out_file : "/var/log/megsapp-sim-card-process/out.log", }
from adonis-scheduler.
Related Issues (20)
- Which version is valid for Adonis 3.2? HOT 3
- error: `make:task` is not a registered command HOT 16
- Non-js files are picked up by the run:schedule command HOT 1
- Run schedules without the ./ace command HOT 2
- call task in the project not from terminal HOT 1
- Use Websockets in Tasks HOT 4
- Cannot use Adonis Logger provider in Task HOT 2
- Make sure CommandsProvider extends the base command HOT 2
- AdonisJs CronJobs HOT 1
- Cannot run migration HOT 1
- Thanks @hoangmy92, that is what I would recommend. HOT 3
- Data type error in the population of the logs HOT 1
- Cannot Load Tasks In Subdirectory HOT 6
- E_INVALID_SERVICE_PROVIDER: SchedulerProvider must extend base service provider class
- How to exit the cron job when an error occurs? HOT 1
- Is it possible to run every 30 seconds? HOT 1
- timezone different in server HOT 1
- As wheels in production? HOT 2
- Is Adonis-Scheduler still maintained?
- How do I set this package up on Heroku?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adonis-scheduler.