Last Updated: June 14, 2017
· lazybios

cron task best practices

  • use whenever manage crontab schedule
  • use rake to execute task. the task don't be to heavy, move complex part to service object or model
  • make task log in a separate file
  • use exception monitor like sentry

  • if your task is very busy. such as 1/mins times. you should consider sidekiq-cron,it can avoid rails env be loaded frequently.