title: How to run a simple npm command as a cron job in elastic beanstalk environment?
body: <p>I have a Node.js application running on aws elasticbeanstalk. I want to periodically run the 'npm update' command in the root of the application. I use .config files in .ebextensions folder to do other tasks such as sending logs to papertrail. So I researched a bit to find something similar for cron jobs and found this article <a href="https://aws.amazon.com/premiumsupport/knowledge-center/cron-job-elastic-beanstalk/" rel="nofollow noreferrer">https://aws.amazon.com/premiumsupport/knowledge-center/cron-job-elastic-beanstalk/</a></p>
  
  <p>But looks like this is meant for worker environments only. I just need to run 'npm update' on my application daily so that it updates the npm packages without having to re-deploy/re-build the environment. What's the easy way to add this specific cronjob to my EBS app?</p>