stonecolddevin has asked for the wisdom of the Perl Monks concerning the following question:

Howdy again all,
I'm looking to find out how to create a cron job that will delete old "chat" room files, one nightly, and another every 3 minutes or so. I can write the script, I just need to know how to use cron to execute it at the given time(s).

Thanks again,
-Dhoss

Ergo!!! Vis a Vis!!! Concordidly!!! Mr. Timberlake. I apologize. I don't usually like to use my big voice.
Will Ferrill as the Architect from the Matrix 2:Reloaded

Replies are listed 'Best First'.
Re: cron job to delete files?
by Abstraction (Friar) on Jul 04, 2003 at 02:43 UTC
      I'm sorry, I just figured I was writing a perl script to do a job so I might as well ask the question here, sorry though.

      And if you're feeling lucky... come and take me home And if you feel loved If you feel lucky, if you feel loved If you feel lucky, if you feel loved You've crossed the walls - Excelled Further along through their hell All for my heart, I watch you kill You always have, you always will Now spread your wings and sail out to me....
        I just figured I was writing a perl script to do a job

        There's probably no good reason to use Perl for that. I would think that rm would do just fine.

        -sauoq
        "My two cents aren't worth a dime.";
        
        I just figured I was writing a perl script to do a job so I might as well ask the question here

        Considering that you were very likely sitting in a chair while writing the job, did you consider contacting customer service of a furniture store about your cron question?

        Abigail

Re: cron job to delete files?
by naChoZ (Curate) on Jul 04, 2003 at 03:07 UTC
    man 5 crontab is also worth a look.

    ~~
    naChoZ

Re: cron job to delete files?
by archen (Pilgrim) on Jul 04, 2003 at 19:34 UTC
    you might also consider looking up the program 'tmpwatch'. You might find it'll save you some work.