On Thu, 2003-08-28 at 04:28, Marc Adler wrote:
> * Bret Hughes <[EMAIL PROTECTED]> [2003-08-27 17:27]:
> > On Wed, 2003-08-27 at 22:11, Johnie Stafford wrote:
> > > On Wed, 2003-08-27 at 21:52, MKlinke wrote:
> > > > On Wednesday 27 August 2003 21:21, Marc Adler wrote:
> 
> [snip shell script -- I'm too newbie for that...]
> 
> > > 
> > > Another option is to have cron earn its keep. Add something like this to
> > > your crontab
> > > 
> > > */5 * * * * fetchmail >> /var/log/fetchmail.log
> > > 
> > 
> > sort of what I do.  I have a once a day fetchmail cronjob that runs in
> > the morning for my self.  we only have a few users that need this so it
> > is no big deal.  ~/.fetchmailrc has set daemon 300 as the first line so
> > it puts it in daemon mode if it is not running and tickles it if it is
> > already running.  It only runs once a day :
> > 
> > 0 7 * * * /usr/bin/fetchmail
> > 
> 
> So if I understand this properly, */5 means making it run every five
> minutes, but my ~/.fetchmailrc file is already set to fetch my mail
> every sixty seconds, so I don't need that, I assume. On the other hand,
> 0 7 * * * sets it to run at seven in the morning every day, right?  The
> problem is, I turn off my computer during the day sometimes, so if I
> want to have it run every hour, I'm assuming I should set it like this: 
> 
> * */1 * * *
> 

This is no different than * * * * * (I.E. it will run every minute).  To
make it run every hour you must pick a time of the hour when you want it
to run (E.G. at half past the hour).  The corresponding time fields for
the crontab line would be: 30 * * * *

> Also, do I need to write out "/usr/bin/fetchmail" or will a simple
> "fetchmail" do?

"fetchmail" will do.

> 
> And a final question: this should be done by using crontab -e to create
> the var/spool/cron/marc file, right?

That's right using "crontab -e" will let you edit the crontab.  It will
update timestamps on the crontab directory so cron will notice that
there have been changes made and reread any changed crontabs.  If you
didn't use "crontab -e" you would have to restart the daemon after
editing for the new changes to be picked up.


Juan

> 
> Thanks for your patience!
> -- 
> Marc Adler


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to