Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 159446 - sys-process/cronbase: crontab no work in time for hourly. daily etc
Summary: sys-process/cronbase: crontab no work in time for hourly. daily etc
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Cron Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 169449
  Show dependency tree
 
Reported: 2006-12-29 23:38 UTC by Lurkan
Modified: 2015-07-23 07:05 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lurkan 2006-12-29 23:38:50 UTC
System uname: 2.6.15-gentoo-r1 i686 AMD Sempron(tm) Processor 2800+
Gentoo Base System version 1.12.4
Last Sync: Mon, 11 Dec 2006 20:00:03 +0000


merge  --search  cronbase
Searching...
[ Results for search key : cronbase ]
[ Applications found : 1 ]

*  sys-process/cronbase
      Latest version available: 0.3.2
      Latest version installed: 0.3.2
      Size of files: 0 kB
      Homepage:      http://www.gentoo.org/
      Description:   base for all cron ebuilds
      License:       GPL-2

Crontab work fine and all personal crontab work fine.

The trouble is in the cron {hourly daily monthly weekly} no work in your time.

root # cat /etc/crontab
# for vixie cron
#
# $Header: /var/cvsroot/gentoo-x86/sys-process/vixie-cron/files/crontab-3.0.1-r4,v 1.1 2005/03/04 23:59:48 ciaranm Exp $
#
#

# Global variables
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
0  *  * * *     root    rm -f /var/spool/cron/lastrun/cron.hourly
1  3  * * *     root    rm -f /var/spool/cron/lastrun/cron.daily
15 4  * * 6     root    rm -f /var/spool/cron/lastrun/cron.weekly
30 5  1 * *     root    rm -f /var/spool/cron/lastrun/cron.monthly
*/10  *  * * *  root    test -x /usr/sbin/run-crons && /usr/sbin/run-cron

In this crontab all scrip run 10 minutes behind schedule.
-rw------- 1 root    root      72703 Dec 30 02:31 messages
-rw------- 1 root    root      14627 Dec 27 03:10 messages.1.gz
-rw------- 1 root    root      12607 Dec 20 03:10 messages.2.gz
-rw------- 1 root    root      28208 Dec 13 03:10 messages.3.gz
-rw------- 1 root    root      24221 Dec  6 03:10 messages.4.gz
check the time.

the trouble is this line:

*/10  *  * * *  root    test -x /usr/sbin/run-crons && /usr/sbin/run-cron

my solution is to modify /etc/crontab in thsi form:

# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
0  *  * * *     root    rm -f /var/spool/cron/lastrun/cron.hourly && /usr/sbin/run-crons
01 0  * * *     root    rm -f /var/spool/cron/lastrun/cron.daily && /usr/sbin/run-crons
15 4  * * 6     root    rm -f /var/spool/cron/lastrun/cron.weekly && /usr/sbin/run-crons
30 5  1 * *     root    rm -f /var/spool/cron/lastrun/cron.monthly && /usr/sbin/run-crons
#*/10  *  * * * root    test -x /usr/sbin/run-crons && /usr/sbin/run-crons

and the log work fine:

-rw------- 1 root    root       26365 Dec 30 01:31 messages
-rw------- 1 root    root        4743 Dec 30 00:01 messages.1.gz
-rw------- 1 root    root        3031 Dec 29 00:01 messages.2.g
-rw------- 1 root    root        2687 Dec 28 00:01 messages.3.gz
-rw------- 1 root    root        3427 Dec 27 00:01 messages.4.gz
Comment 1 SpanKY gentoo-dev 2006-12-30 00:11:44 UTC
dont check the boxes if you dont know what they're for
Comment 2 SpanKY gentoo-dev 2015-07-23 07:05:04 UTC
there's no real info as to what the problem is you're experiencing.  i don't know what "cron {hourly daily monthly weekly} no work in your time" means, and i don't see how changing the crontab entries have any real bearing.  in fact, those changes defeat the purpose of run-crons -- to catch up on jobs that were missed because the system happened to be turned off/suspended in the middle of the nite.

for more details, see the discussion in bug 69777