/etc/cron.daily/apt hangs [solved]
Markus Schönhaber
ubuntu-users at list-post.mks-mail.de
Mon Feb 23 23:18:10 UTC 2009
Daevid Vincent:
> So when I expect all my cron.daily tasks to be running at a given time
> in crontab, they're actually all delayed by some random amount. Since
> it's name is alphabetically earlier than anything else in the directory,
> this 'apt' holds up all the scripts below as they're not fired off in
> threads. *sigh*
Hm, you're the first one I know of who expects jobs in cron.daily to be run
precisely at a given time. In my understanding jobs in cron.daily are to be
run once a day - whenever that may be throughout the day. And since those jobs
are executed sequentially, it's pretty obvious that any delay in one job (be
it caused by a sleep like in the apt script, a slow network or something else)
will affect the execution time of all following jobs.
If I want something to be executed precisely at a given time, I create a real
cron job for it.
> "The random sleep was added to avoid that the big archive
> servers/mirrors get hammered at exactly the same time when a lot of
> machines are switched on, e.g. 9:00 in the morning. '
>
> Who "switches on" a Unix box??! They normally are running 24/7 right?
Interesting that you ask this question in an Ubuntu mailing list. Since IMO
Ubuntu's main success is based on the fact that it provides an easy to set up
*desktop* Linux.
And my guess would be that many of those desktops might get switched off in the
evening and switched back on in the morning. At least, this doesn't seem too
unrealistic a guess to me.
Moreover I think we can assume that the people operating the archive servers
know when the load is high and whether the load spikes form a pattern.
Regards
mks
More information about the ubuntu-users
mailing list