title: Run ts-node via cron job
body: <p>I use a script written in TypeScript in order to redetermine item statuses in my app. I usually run this line:</p>
  <pre><code>npx ts-node statuscheck.ts
  </code></pre>
  <p>I wanted this to run everyday at midnight, and for that I tried to schedule a cron job as below:</p>
  <pre><code>0 0 * * * npx ts-node statuscheck.ts
  </code></pre>
  <p>It doesn't really work, I believe because $PATH is different in cron. Does anyone know the correct way of scheduling this script preferrably with ts-node as in the orinal npx line?</p>