Questions tagged [whenever]

a Ruby gem that makes it possible to define cron tasks in Ruby

whenever is a Ruby gem that makes it possible to write and maintain cron tasks in Ruby, using a simplified and expressive syntax.

Resources

Related Tags

500 questions
1
vote
0 answers

Can I use backup gem with whenever in docker?

Environment: Docker version 20.10.10, Docker image: from Ruby 2.7.2 Gems: Backup: 5.0.0.beta.3 Rails: 6.1.5 whenever: 1.0.0 In schedule.rb, I have updated the command every 1.minute do command "/usr/local/bundle/bin/backup perform -t db_backup…
hengsokly
  • 116
  • 1
  • 6
1
vote
2 answers

ruby whenever gem log location in Ubuntu?

I'm running the whenever (cron) gem on Ubuntu 11 and can't seem to find where the log is or where to set the log file. I think something is amiss and I can't seem to be able to debug it without the log file. Thanks
Rio
  • 14,182
  • 21
  • 67
  • 107
1
vote
4 answers

Running whenever cron in Windows

Total newbie at cronjobs and that kinda stuff, never done it before, so now I tried to get my hands dirty using whenever as a plugin, after seeing it on RailsCasts. So I am trying to run a cron job for my Ruby application, but it seems like it's not…
1
vote
1 answer

- Rails & cron & whenever / a few minutes delay when the server is heavily loaded

I use a gem called whenever to manage my cron jobs. In cronfile, I have every 1 minute cron job which call a task XXXX. My config/schedule.rb is like this: every '* * * * *' do rake "XXXXXXXX" end This cron job is working fine with make slight…
user16012143
  • 139
  • 7
1
vote
1 answer

Rails Whenever gem not executing repetitive crontab task with Ubuntu and Docker Compose

I'm trying to run a repetitive task using the Whenever gem for my rails app. It is running in a Docker container created using Docker Compose and hosted on an Ubuntu server. I can successfully create and update the crontab file using the Whenever…
John Hanlon
  • 462
  • 3
  • 10
  • 22
1
vote
1 answer

How to check for time every minutes in Rails

Let's say I want to build a Reminder App. It allow user to set a time which will remind them to do their work. For example: 24th March 07:03 PM. The easiest way I can think of is to use whenever gem and set a crontab every minutes and check if there…
jameslee
  • 23
  • 3
1
vote
1 answer

The 'command' method is being ignored by the whenever scheduling gem

I am using the whenever gem to schedule tasks on OSX Mojave. In the scheduling file, I have #config/schedule.rb set :output, "log/cron.log" every 1.day, at: '23:00' do rake 'util:something' runner 'User.something_else' command "echo 'I just…
Obromios
  • 15,408
  • 15
  • 72
  • 127
1
vote
0 answers

using crontab with whenever gem in ruby

I'm having an issue with trying to use the whenever gem to schedule a job. I've installed the gem, and created the schedule.rb file, with a job to run at '11:00 pm'. However, from my understanding I need to run whenever --update-crontab But this…
b.herring
  • 563
  • 2
  • 18
1
vote
1 answer

I have problem with whenever gem on local

After running whenever -i in log files is see this messages. What should i do to fix this problem? cut: /link/to/my/project/.ruby-version: Operation not…
1
vote
0 answers

How to create crontabs for controller method?

resource "items" controller "items" -> method "check_item" view "items" -> link_to check_item I need to create an input form for user to enter the period of time "N [seconds or minutes or hours]" and new "link_to" in my view that will create a…
iRoller
  • 23
  • 6
1
vote
1 answer

ActiveRecord task executing in wrong environment with Whenever

I have to run a Cron task involving some data cleaning in my ActiveRecord database. I am using Whenever gem. Here is the code : schedule.rb every 1.hour do rake 'notifications:clear' end notifications.rake namespace :notifications do task…
KawaLo
  • 1,783
  • 3
  • 16
  • 34
1
vote
0 answers

Rails cron job not running using whenever on Docker

I'm currently using whenever gem for running my Sidekiq worker. It's perfectly fine when I'm running the Sidekiq worker but when I run it in background using cron it's not working. Dockerfile FROM ruby:2.6.0-slim RUN apt-get update -qq \ &&…
AllenC
  • 2,754
  • 1
  • 41
  • 74
1
vote
1 answer

Rails5 How to deliver email reports each month?

I'm trying to design a reporting system that notifies administrators about user's messaging rate and response time for a customer service app. I have a tenant class that looks like this: class Tenant < ApplicationRecord has_many :users has_many…
Alvaro Alday
  • 343
  • 3
  • 19
1
vote
1 answer

how to use Whenever gem properly

I am just trying to create a record every 5 minutes using whenever gem but it doesn't create anything on the production. config/schedule.rb every 5.minutes do runner "Post.new_post" end lib/tasks/post.rb class Post def new_post …
1
vote
1 answer

Why does rake task not run via cron?

I have defined a task such that running rake background:fetch_image as my user works as expected. It also works as expected if I run sudo -u www-data rake background:fetch_image. I do not believe the error I shall describe is caused by code I wrote…
Marshall Davis
  • 3,337
  • 5
  • 39
  • 47