Why does cron hate me so?

Once *again*, cron decided that it would stop deleting my Rails cached files after I upgraded to Hardy. I’m totally stumped as to why it happened — the logs say that the rf -rm happened at the scheduled times for the last two weeks, and I was able to successfully do it by sudoing into the appropriate user, but the files were still on disk and being happily served by Nginx, oblivious to the fact that Mother’s Day and Cinco de Mayo had long since passed.

Argh, I hate computers some days…

No Responses to “Why does cron hate me so?”

  1. Olli May 19, 2009 at 5:56 am #

    The cron job doesn’t actually have “rf -rm” though right? I’m assuming that’s just a typo on your blog. (should be “rm -rf”)

  2. foo May 19, 2009 at 8:18 am #

    Just now upgrading to Hardy? Two releases back? Living on the edge, man.. ;-)

  3. Andreas Alexelis May 19, 2009 at 7:35 pm #

    Patrick,

    if your files are at a path relative to home directory, try including the -H option to sudo.

    Alternatively, you can try
    su – AppropriateUser -c “rm -rf FilesToDelete

    I hope this helps.