Can someone please tell me how to make this cron job?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mikeeee
    Registered User
    • Jun 2003
    • 481

    #1

    Can someone please tell me how to make this cron job?

    I need to make this command run every 3 hours:

    rm -f /var/spool/mqueue/*

    Also... I need to get pine to delete all the email in it every 3 hours as well.

    Can anyone tell me how to do this? Ive never messed with cron so if you can be descriptive or point me to the right direction I'd appreceate it.

    I know its a weird command to do but its a long story and its my only solution. Thanks!

    btw this is a plain ensim p4 box.
  • badmrfrosty
    Confirmed User
    • May 2003
    • 500

    #2
    So put that command into a file called like deletespam.sh, then go to /etc/crontab and enter this:

    03 * * * * root run-parts /whateverpath/deletespam.sh

    That should do it every 3 hours.

    -Drew

    Comment

    • Azathoth
      Confirmed User
      • Nov 2002
      • 217

      #3
      Or more simply put:

      0 */3 * * * rm -f /var/spool/mqueue/*

      Comment

      Working...