On 9/20/2011 5:22 PM, Chuck Payne wrote:
On Tue, Sep 20, 2011 at 5:11 PM, Andreas<maps.on@gmx.net> wrote:
Hi,
how can I set the time when cron.daily executes ? On earlier setups of OpenSuse the scripts in /etc/cron.daily ran very late at night which is OK. On my latest setup they get started at 09:45am.
Can I set it back to 04:00am ? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
I use this on my servers to make sure that they are uptodate
@daily /usr/sbin/sntp -P no -r pool.ntp.org
If you want to do that at 4am it would look like this
0 4 * * * /usr/sbin/sntp -P no -r pool.ntp.org
I think the question was slightly mis-phrased. What he meant was how to set the time _that_, or _at which_, cron.daily is run. The answer is "Use the source Luke!" /etc/crontab has: -*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1 /usr/lib/cron/run-crons has: if [ -f /etc/sysconfig/cron ]; then . /etc/sysconfig/cron fi /etc/sysconfig/cron has: ## Type: string ## Default: "" # # At which time cron.daily should start. Default is 15 minutes after booting # the system. Example setting would be "14:00". # Due to the fact that cron script runs only every 15 minutes, # it will only run on xx:00, xx:15, xx:30, xx:45, not at the accurate time # you set. DAILY_TIME="" That is one problem with using distribution value-add to system tools. They are not documented in the man pages. "man cron" would not have told you about run-crons. It would have told you about /etc/crontab and you could have seen run-crons there, but then "man run-crons" does not exist so you are left having to do what I did above, actually go look at the file and hope it's a script and not a binary, and hope you can read the script language well enough to make some sense of it. I'm sure suse documents this somewhere, but apparently you couldn't find it, so it wasn't in a very good spot, because you did at least try, right? -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org