I have a JavaScript file which does some processing and calls a php file in the end. I need to do this entire processing on the server using a cron tab.
Can I write my JavaScript file as
<?php
echo '<script type="text/javascript"> // JS code ... </script>';
?>
and then use crontab to run the php file?
Or
Should I use node.js to run my JavaScript file on the server using cron tab?