简体   繁体   中英

How to schedule an adonisjs command with plesk scheduler?

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

当我使用这个命令时它起作用了:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM