GithubHelp home page GithubHelp logo

Comments (5)

hoangmy92 avatar hoangmy92 commented on May 26, 2024 14

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.

 avatar commented on May 26, 2024 1

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.

prashanth1k avatar prashanth1k commented on May 26, 2024 1

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.

nrempel avatar nrempel commented on May 26, 2024

Thanks @hoangmy92, that is what I would recommend.

Closing for now, feel free to re-open if there are any issues.

from adonis-scheduler.

davidalexamos avatar davidalexamos commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.