anacron can't run hourly?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

anacron can't run hourly?

ze phyr
Hi Debianers,

Can anacron run hourly jobs?

My /etc/anacrontab reads like this:

=================
1       5       cron.daily       nice run-parts --report /etc/cron.daily
7       10      cron.weekly      nice run-parts --report /etc/cron.weekly
@monthly        15      cron.monthly nice run-parts --report
/etc/cron.monthly
================

I want to schedule mail fetching and sending for every few minutes, but from
the information I got so far, it seems anacron can't handle hourly jobs.


regards,


bxuef


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: anacron can't run hourly?

Steve Lamb
phyrster wrote:
> Can anacron run hourly jobs?

    Nope.  Isn't that what cron is for?

--
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
       PGP Key: 8B6E99C5       | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------

signature.asc (264 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: anacron can't run hourly?

Pascal Hakim
In reply to this post by ze phyr
On Wed, Jul 20, 2005 at 12:38:57PM +0800, phyrster wrote:
> Hi Debianers,

Hi,

>
> Can anacron run hourly jobs?

Nope. The smallest timespan that anacron can schedule jobs for is a day.

> My /etc/anacrontab reads like this:
>
> =================
> 1       5       cron.daily       nice run-parts --report /etc/cron.daily
> 7       10      cron.weekly      nice run-parts --report /etc/cron.weekly
> @monthly        15      cron.monthly nice run-parts --report
> /etc/cron.monthly
> ================
>
> I want to schedule mail fetching and sending for every few minutes, but from
> the information I got so far, it seems anacron can't handle hourly jobs.

You should be using cron for this. The real advantage of anacron comes in
when you want to make sure things like cron.daily run at least once a
day, when your computer is not always on.

Adding support for anacron to have hourly granularity would be possible,
but I can't really think of a situation where this would be desirable
(but feel free to file a wishlist bug against anacron if you can come up
with a situation where it would be useful to have such a feature!)

Cheers,

Pasc
--
Pascal Hakim                                       0403 411 672
Do Not Bend


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: anacron can't run hourly?

Jose Cedeno


On 7/21/05, Pascal Hakim <[hidden email]> wrote:
On Wed, Jul 20, 2005 at 12:38:57PM +0800, phyrster wrote:
> Hi Debianers,

Hi,

>
> Can anacron run hourly jobs?

Nope. The smallest timespan that anacron can schedule jobs for is a day.

> My /etc/anacrontab reads like this:
>
> =================
> 1       5       cron.daily       nice run-parts --report /etc/cron.daily
> 7       10      cron.weekly      nice run-parts --report /etc/cron.weekly
> @monthly        15      cron.monthly nice run-parts --report
> /etc/cron.monthly
> ================
>
> I want to schedule mail fetching and sending for every few minutes, but from
> the information I got so far, it seems anacron can't handle hourly jobs.

You should be using cron for this. The real advantage of anacron comes in
when you want to make sure things like cron.daily run at least once a
day, when your computer is not always on.

Adding support for anacron to have hourly granularity would be possible,
but I can't really think of a situation where this would be desirable
(but feel free to file a wishlist bug against anacron if you can come up
with a situation where it would be useful to have such a feature!)

Cheers,

Pasc
--
Pascal Hakim                                       0403 411 672
Do Not Bend


What about using a script that does what you want, goes to sleep for 1 hour and then calls itself.

Jose

 

--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: anacron can't run hourly?

Dave Ewart
On Friday, 22.07.2005 at 04:06 -0700, Jose Cedeno wrote:

> On 7/21/05, Pascal Hakim <[hidden email]> wrote:
> >
> > On Wed, Jul 20, 2005 at 12:38:57PM +0800, phyrster wrote:
> > > Hi Debianers,
> >
> > Hi,
> >
> > >
> > > Can anacron run hourly jobs?
> >
> > Nope. The smallest timespan that anacron can schedule jobs for is a day.
> >
> > > My /etc/anacrontab reads like this:
> > >
> > > =================
> > > 1 5 cron.daily nice run-parts --report /etc/cron.daily
> > > 7 10 cron.weekly nice run-parts --report /etc/cron.weekly
> > > @monthly 15 cron.monthly nice run-parts --report
> > > /etc/cron.monthly
> > > ================
> > >
> > > I want to schedule mail fetching and sending for every few minutes, but from
> > > the information I got so far, it seems anacron can't handle hourly jobs.
> >
> > You should be using cron for this. The real advantage of anacron comes in
> > when you want to make sure things like cron.daily run at least once a
> > day, when your computer is not always on.
> >
> > Adding support for anacron to have hourly granularity would be possible,
> > but I can't really think of a situation where this would be desirable
> > (but feel free to file a wishlist bug against anacron if you can come up
> > with a situation where it would be useful to have such a feature!)
>
> What about using a script that does what you want, goes to sleep for 1 hour
> and then calls itself.
As mentioned above, you should use cron for scheduled jobs with a
frequency of more than daily.  However, given that you want to 'fetch
and send mail' periodically, it may be that you can what you ask using
the mail programs themselves.  For example, fetchmail can run in daemon
mode where it will look for new mail every N seconds (when started as
'fetchmail -d N'); also, many MTAs can be fairly easily configured to
run at intervals too.

Dave.

--
Please don't CC me on list messages!
...
Dave Ewart - [hidden email] - jabber: [hidden email]
All email from me is now digitally signed, key from http://www.sungate.co.uk/
Fingerprint: AEC5 9360 0A35 7F66 66E9 82E4 9E10 6769 CD28 DA92


signature.asc (196 bytes) Download Attachment