how to make the whenever gem to run a cron job?
I have installed the whenever gem into my rails project
successfully,could any one tell me on how i can get this gem run a rake
task for me...

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Colin Law at Jan 7, 2012 at 8:46 am

    On 7 January 2012 04:46, dv dhanadan wrote:
    how to make the whenever gem to run a cron job?
    I have installed the whenever gem into my rails project
    successfully,could any one tell me on how i can get this gem run a rake
    task for me...
    If you are using cron then you do not need to use whenever. Simple
    run the rake task from cron.

    Colin

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Alex Mercer at Jan 7, 2012 at 10:50 am
    Whenever just helps to use cron with simple ruby syntax.
    To make it run cronjobs. You need to:
    1. Exec in your project folder:
    wheneverize .
    This will create config/schedule.rb file.

    2. There type some action needed to be done with cron:
    every 3.hours do
    rake "my:rake:task"
    end

    3. Save it and execute that
    whenever --update-crontab
    This will update crontab file.
    You can ensure that crontab is written by
    crontab -l

    4. And final point restart cron
    sudo services cron restart

    Enjoy =)
    On Jan 7, 10:45 am, Colin Law wrote:
    On 7 January 2012 04:46, dv dhanadan wrote:

    how to make the whenever gem to run a cron job?
    I have installed the whenever gem into my rails project
    successfully,could any one tell me on how i can get this gem run a rake
    task for me...
    If you are using cron then you do not need to use whenever.  Simple
    run the rake task from cron.

    Colin
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Colin Law at Jan 7, 2012 at 11:22 am

    On 7 January 2012 10:50, Alex Mercer wrote:
    Whenever just helps to use cron with simple ruby syntax.
    If I had looked up whenever before replying then my post might have
    been more helpful :(

    Colin

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Dharmdip Rathod at Jan 7, 2012 at 12:55 pm
    whenever --update-crontab -set='environment=development'

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Dv abhi at Jan 10, 2012 at 12:59 pm
    "And final point restart cron
    sudo services cron restart"

    I am using Ubuntu 10.04,i tried running this code sudo /etc/init.d to
    restart the cron,but did not work,do you have any fixes for that

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Alex Mercer at Jan 10, 2012 at 8:59 pm
    dv abhi,
    Can you provide more info?
    Have you tried to run `sudo services cron restart` and what output it
    gives?
    On 10 янв, 14:58, dv abhi wrote:
    "And final point restart cron
    sudo services cron restart"

    I am using Ubuntu 10.04,i tried running this code sudo /etc/init.d to
    restart the cron,but did not work,do you have any fixes for that

    --
    Posted viahttp://www.ruby-forum.com/.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 7, '12 at 4:46a
activeJan 10, '12 at 8:59p
posts7
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase