Important cron gotcha: Cron not being updated.

Image for Important cron gotcha: Cron not being updated. from unsplash.com

By Andrew McCombe
May 12, 2011


I was recently caught out by a crontab running even after I had edited the crontab and commented out the line. I used VIM and edited the file followed by a :w command but the cron was not being updated.

It turns out that the crontab isn't updated until the editor is closed too. As I still had the file open, the crontab was unchanged.

Hopefully this will help someone out in the future.