How to stop cron jobs created by "whenever" gem

AdamT picture AdamT · Dec 15, 2011 · Viewed 11.4k times · Source

I'm using the "whenever" gem and got it working by doing:

whenever --set environment=production --update-crontab theCronJob

The interval I'm using is 2 minutes since I'm still trying to figure it out. However, now I get a You have mail message in my terminal window every 2 minutes. I guess the cron runs and lets me know about it. How do I stop my cron from running? These messages are starting to pile up.

Thank you

Answer

jbrowning picture jbrowning · Dec 15, 2011

To delete the auto-generated cronjobs from your crontab, run whenever against your defintion file with the -c flag:

$ whenever -c theCronJob

Alternatively, open your crontab...

$ crontab -e

... and then manually delete the undesired entries.