X
X
xlo2402017-08-07 15:15:55
PHP
xlo240, 2017-08-07 15:15:55

Can cron run javascript?

Can Cron run javascript contained in a php file that Cron runs?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
X
xmoonlight, 2017-08-07
@xlo240

1. Execute JS from PHP: php.net/manual/ru/book.v8js.php
2. www.nightmarejs.org phantomjs.org

S
Sergey Sokolov, 2017-08-07
@sergiks

You can install Node.js on the server , and run externally from PHP through some exec()nodejs script.js

S
Saboteur, 2017-08-07
@saboteur_kiev

No, cron can't execute javascript.
You can try cron launching a browser that will open a page that will be opened from a web server that will execute php. Then it will be possible to nail this browser using the same crown.

L
Lander, 2017-08-07
@usdglander

Perhaps Selenium will help you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question