Cron job to use fetchmail every hour


Results 1 to 3 of 3

Thread: Cron job to use fetchmail every hour

  1. #1
    Join Date
    Feb 2007
    Posts
    2

    Cron job to use fetchmail every hour

    Can someone clarify for me the command to use fetchmail as a cron job every hour?

  2. #2
    Join Date
    Jun 2002
    Location
    Jamaica Plain, MA
    Posts
    458
    first, you probably don't want to cron fetchmail, but you could.
    Fetchmail has a daemon option that takes a value in seconds it should wait before rechecking for mail.

    set daemon 3600 # once an hour

    If you really want to use cron, I would configure my .fetchmailrc to not run as daemon and make sure it working first.

    then as the user you want to fetchmail for run: crontab -e

    like any other cron job
    # m h dom mon dow command
    5 * * * * /usr/X11R6/bin/fetchmail >/dev/null 2>&1
    # fetchmail once an hour at the 5.

  3. #3
    Join Date
    Feb 2007
    Posts
    2
    Should have mentioned I am using cpanel to do this cronjob

    so far I have tried various combinations, fetchmail is part of Horde in cpanel, and I have setup the mailboxes to retrieve the mail from and the remote mail as my yahoo email address:

    */5 * * * * /usr/bin/fetchmail -v -f /DEFAULTBOX/.fetchmailrc -L /var/log/fetchmail.log

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •