javan / javan/whenever

Issue when using runner

Open
#816 2 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
8.9k
Forks
715
PR merge metrics
No merged PRs in 30d

Description

When I use runner, I have issue in crontab -e

In config/schedule.rb

every 2.minutes do
  runner "GuestsCleanupJob.perform_now"
end

In crontab -e

0,12,24,36,48 * * * * /bin/bash -l -c 'cd /home/ubuntu/testapp && bundle exec bin/rails runner -e production '\''GuestsCleanupJob.perform_now'\'''

I am sure the crontab update is error.
'\''GuestsCleanupJob.perform_now'\'''

Why crontab is updated like this?

Thanks

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 config/schedule.rb and the generated crontab entry, then inspect the bin/rails runner invocation shown. Confirm whether the quoting around GuestsCleanupJob.perform_now is valid and whether it is produced by Whenever. Done means explaining the generated command or identifying the change needed if the escaping is incorrect.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.