Skip to content

Instantly share code, notes, and snippets.

@ilake
Created February 19, 2013 02:25
Show Gist options
  • Select an option

  • Save ilake/4982584 to your computer and use it in GitHub Desktop.

Select an option

Save ilake/4982584 to your computer and use it in GitHub Desktop.
cronjob
PATH=/usr/local/bin:/usr/bin:/bin:$PATH
20 23 * * * cd /var/www/foo;RAILS_ENV=production bundle exec rake task:jobs auto_update=true >> /var/www/foo/log/foo_info_$(date +\%m\%d\%Y).log
PATH=/usr/local/bin:/usr/bin:/bin:$PATH
0 0 * * * cd /var/www/foo;RAILS_ENV=production bundle exec rake task:jobs auto_update=true from_date=$(date -dyesterday +\%m/\%d/\%Y) >> /var/www/foo/log/foo_info_$(date -dyesterday +\%m\%d\%Y).log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment