DEV Community


Discussion on: Cron jobs in Rails: A simple guide to ACTUALLY using the Whenever gem (now with tasks!)

icesatwo profile image

Hi, new to rails here, running rails g task keeps over writing my rake file, do you have any idea why that could be? any help would be appreciated greatly!

risafj profile image
Risa Fujii Author

Hi, why are you running rails g task multiple times? You only need to create the task once. Running the task is done via a command like rails batch:send_messages (Example taken from my blog post, please use your actual task name and namespace).

Some comments have been hidden by the post's author - find out more