Subject: Problems with cron on netbsd-4
To: NetBSD Current Users <current-users@NetBSD.org>
From: Chris Ross <cross+netbsd@distal.com>
List: current-users
Date: 10/26/2007 21:43:44
After spending some time wondering why cron wasn't sending me
email, I figured that out (for anyone who cares, bin/37226). Now, on
my 4.0_RC3 sparc64 box, cron seems to be running my job way too often.
I have the crontab, for myself at a non-root user, set as such:
0 * * * * /bin/date
As I understand cron, for the last 15 years, this should run date,
output to email [to me] at the top of each hour.
However, it runs once a minute. At least. (I've seen it run
twice a minute on occasion, but...)
When running cron -x sch I see:
debug flags enabled: sch
[20024] cron started
[20024] TargetTime=1193449324, sec-to-wait=60
[20024] sleeping for 60 seconds
[20024] tick(0,19,30,11,3)
[20024] TargetTime=1193449384, sec-to-wait=60
[20024] TargetTime=1193449384, sec-to-wait=60
[20024] sleeping for 60 seconds
log_it: (root 18428) CMD START (/usr/bin/newsyslog)
log_it: (root 14797) CMD START (/usr/libexec/atrun)
log_it: (cross 24732) CMD START (/bin/date)
log_it: (root 15845) CMD FINISH (/usr/bin/newsyslog)
[20024] sleeping for 60 seconds
log_it: (root 24689) CMD FINISH (/usr/libexec/atrun)
[20024] sleeping for 60 seconds
log_it: (cross 14786) CMD FINISH (/bin/date)
[20024] sleeping for 59 seconds
[20024] tick(0,19,30,11,3)
[20024] TargetTime=1193449444, sec-to-wait=60
[20024] TargetTime=1193449444, sec-to-wait=60
[20024] sleeping for 60 seconds
log_it: (root 1364) CMD START (/usr/bin/newsyslog)
log_it: (root 24614) CMD START (/usr/libexec/atrun)
log_it: (cross 12094) CMD START (/bin/date)
log_it: (root 24613) CMD FINISH (/usr/bin/newsyslog)
[20024] sleeping for 60 seconds
log_it: (root 17133) CMD FINISH (/usr/libexec/atrun)
[20024] sleeping for 60 seconds
log_it: (cross 4310) CMD FINISH (/bin/date)
[20024] sleeping for 59 seconds
So, we see, it keeps running date. Why? I've no idea. Anyone
else have an idea?
- Chris