[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Fetchmail + Hourly Cron job Howto?
- From: Arindam Dey <adey komnas com>
- To: shrike-list redhat com
- Subject: Re: Fetchmail + Hourly Cron job Howto?
- Date: Mon, 10 Nov 2003 14:52:45 +0800
On Wed, 2003-11-05 at 14:04, Derek Benson wrote:
> man 5 crontab may help
>
> Otherwise
> 30 * * * * /home/user1/fetchmymail.sh
Won't this just fetch the mail only on times like 14:30, 15:30 etc etc.
I doubted that so I set up one job with the above exact line and in the
script just put the output of "date" command on a file in the /tmp dir.
This is the contents of the file
Mon Nov 10 00:30:00 MYT 2003
Mon Nov 10 01:30:00 MYT 2003
Mon Nov 10 02:30:00 MYT 2003
Mon Nov 10 03:30:00 MYT 2003
Mon Nov 10 04:30:00 MYT 2003
Mon Nov 10 05:30:00 MYT 2003
Mon Nov 10 06:30:00 MYT 2003
Mon Nov 10 07:30:00 MYT 2003
Mon Nov 10 08:30:01 MYT 2003
Mon Nov 10 09:30:01 MYT 2003
Mon Nov 10 10:30:00 MYT 2003
Mon Nov 10 11:30:00 MYT 2003
As is evident this will fetch mail only on the half hour marks and not
at half hourly intervals as desired by the original poster. I think the
correct entry in crontab will be
0,30 * * * * /home/user1/fetchmymail.sh
Although the above is untested I think it mostly will work :-).
Best of luck,
--
Arindam Dey
The mind is not a vessel to be filled
but a fire to be kindled.
GPG FPR: B8E3 219E F129 F970 F4A7 BC50 9636 504A BEDF 5739
> Cheers
> Derek
>
> On Wed, 2003-11-05 at 15:40, Ow Mun Heng wrote:
> > How do you set up a cron job such that fetchmail runs hourly? I'm getting
> > fetchmail to poll the Company Exchange server. I would like to run is as
> > that user and not root.
> >
> > Currently I have
> >
> > user1 server] crontab -e
> > 30 06 * * * /home/user1/fetchmymail.sh
> > 30 07 * * * /home/user1/fetchmymail.sh
> >
> > which works fine, but The thing is I would like it to poll like hourly and
> > not go to the extent of putting a cron line for every hour I want it polled.
> > I tried using webmin and got
> >
> > @hourly /home/user1/fetchmymail.sh
> >
> > which _does_ not work. (oh btw,I think this can be acomplish by putting that
> > into the cron.hourly directory but again, that would need root privledge
> > right?)
> >
> > ANy help would be appreciated
> >
> > Thanks
> >
> > Ow
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]