Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run javascript document from PowerShell script

We want to create PowerShell script that will call javascript document, stored on our server. PowerShell script would be started on Task Scheduler at some time we define. Javascript document is about checking some values in table we have on page.

I presume this is possible, but I ask, just to be sure as we found none examples.
If anyone can share example or suggestion where to check it.

I don't ask for solution or "How to do it", just suggestion if this is possible and link to examples would be really appreciated.

Thanks.

like image 536
Danilo Avatar asked Dec 07 '25 05:12

Danilo


1 Answers

If your talking about Node.js not JavaScript then you can use the node command to run a node.js program. First you must download Node.JS if you don't have it already (https://nodejs.org). This is the syntax for the node command:

node path/to/javascript/file

As long as the program doesn't use any web browser feature such as alert() your program will work.

like image 128
ComputingGuest Avatar answered Dec 08 '25 17:12

ComputingGuest



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!