PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, November 13, 2022

[FIXED] How to schedule an adonisjs command with plesk scheduler?

 November 13, 2022     adonisjs-ace, node.js, plesk     No comments   

Issue

I have this created command called 'newsletter'. When I call 'adonis newsletter' on local, it works just fine. But when I try to run with scheduler on plesk with 'cd httpdocs; node ace newsletter', it was completed with this error:

/var/www/vhosts/mydomain.com/httpdocs/node_modules/@adonisjs/ignitor/src/Ignitor/index.js:286
async _bootProviders () {
^^^^^^^^^^^^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:44...

anyone know what is wrong? when i tried 'cd httpdocs; adonis newsletter' it gaves error too, it said that command not found.. my node version is 14


Solution

It worked when I use this command :

cd httpdocs; /opt/plesk/node/v16.13.1/bin/node ace newsletter;


Answered By - FK Rima
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing