javan / javan/whenever

Whenever gem doesn't run on production

Open
#676 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ruby-version-manager-mess usage-question
Dominant language
Ruby
Stars
8.9k
Forks
715
PR merge metrics
No merged PRs in 30d

Description

I have whenever installed on my Rails 4.2.4 application and want to run this command:
rake punching_bag:combine[14,3,2] for punching_bag gem.

punching_bag gem is a hit tracker & this command combines all posts hits for better performance.

My schedule.rb looks like this:

every 1.day, :at => '3:30 am' do
  rake "punching_bag:combine[2,3,2]"
end

When I run crontab -e in my server Ubuntu 12, I can see the cron job:
30 3 * * * /bin/bash -l -c 'cd /home/productiondeploy/mydomain/releases/201611107983652 && RAILS_ENV=production bundle exec rake punching_bag:combine --silent'

But I can see that the command is not running and posts hits are Not combined. Is it something I do wrong here and how to fix it?

Thanks in advanced!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with schedule.rb and the generated crontab entry shown in the report; run the exact production bundle exec rake command manually, then compare its environment and output with cron execution. Done means the scheduled punching_bag:combine task runs in production and combines the post hits.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, rails, ruby, ubuntu
Domain
backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.