title: How to set an environment variable in crontab using Chef?
body: <p>I have a recipe that sets jobs to run from an EC2 instance's crontab. Here's an example of a recipe I'm running:</p>
  
  <pre><code>cron "examplejob" do
   minute "0"
   hour "2"
   command "job"
   user "job"
  end
  </code></pre>
  
  <p>This works great. In addition to this cron job, I also want to set a few environment variables in crontab. Reading <a href="http://wiki.opscode.com/display/chef/Resources#Resources-Cron" rel="nofollow">this</a>, it seems like it should be possible using the "path" attribute. However, I am unable to find a specific example of how to implement this. </p>
  
  <p>I tried:</p>
  
  <pre><code>cron "env" do
   path "MY_VAR=/path/for/variable"
  end
  </code></pre>
  
  <p>But this does not work. How can I get the environment variables to be set at the top of the crontab? Any insight appreciated! Thanks.</p>