title: Running Javascript file on the server using crontab
body: <p>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.</p>
  
  <p>Can I write my JavaScript file as </p>
  
  <pre><code>&lt;?php
      echo '&lt;script type="text/javascript"&gt; // JS code ... &lt;/script&gt;';
  ?&gt;
  </code></pre>
  
  <p>and then use crontab to run the php file?</p>
  
  <p>Or</p>
  
  <p>Should I use node.js to run my JavaScript file on the server using cron tab?</p>