[opensuse] How to set the time when cron.daily executes ?

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

On Tue, Sep 20, 2011 at 5:11 PM, Andreas <maps.on@gmx.net> wrote:
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 -- (678) 636-9678 ----------------------------------------- Discover it! Enjoy it! Share it! openSUSE Linux. ----------------------------------------- openSUSE -- en.opensuse.org/User:Terrorpup openSUSE Ambassador/openSUSE Member skype,twiiter,identica,friendfeed -- terrorpup freenode(irc) --terrorpup/lupinstein Register Linux Userid: 155363 Have you tried SUSE Studio? Need to create a Live CD, an app you want to package and distribute , or create your own linux distro. Give SUSE Studio a try. www.susestudio.com. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

On 9/20/2011 5:22 PM, Chuck Payne wrote:
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

On Tue, Sep 20, 2011 at 05:43:46PM -0400, Brian K. White wrote: [ 8< ]
Please file a bugreport or feature request to get this addressed well. Please reference http://lists.opensuse.org/opensuse/2011-09/msg00550.html in the request or report. Thanks! Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany

Am 20.09.2011 23:22, schrieb Chuck Payne:
Sorry if I wasn't clear enough. :) I don't want to set the system time. I have a backup script in /etc/cron.daily that generates havy cpu load for some minutes. On my older system it ran late at night but now it executes in the working hours. Now I'm wondering if I could set the time when cron runs those daily scripts. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

Andreas said the following on 09/20/2011 05:50 PM:
Why not "Don't bother"? If you want to run a script late at night, why put it in cron.daily? Why not make a separate crontab entry for it that has it run late at night? Take it out of cron.daily and put it in a separate file. -- They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2011-09-20 at 23:11 +0200, Andreas wrote:
That was by chance, it doesn't run at an exact time. You can, however, edit "/etc/sysconfig/cron" and set the time in DAILY_TIME. And some other variables more. - -- Cheers, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAk55C6QACgkQtTMYHG2NR9UaKwCdGi587CeFbB1aJMIa0m5/FXop axEAn2gdvYj684y6VtEX3QaxJbLtp1hy =H2zo -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

On Tue, Sep 20, 2011 at 5:11 PM, Andreas <maps.on@gmx.net> wrote:
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 -- (678) 636-9678 ----------------------------------------- Discover it! Enjoy it! Share it! openSUSE Linux. ----------------------------------------- openSUSE -- en.opensuse.org/User:Terrorpup openSUSE Ambassador/openSUSE Member skype,twiiter,identica,friendfeed -- terrorpup freenode(irc) --terrorpup/lupinstein Register Linux Userid: 155363 Have you tried SUSE Studio? Need to create a Live CD, an app you want to package and distribute , or create your own linux distro. Give SUSE Studio a try. www.susestudio.com. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

On 9/20/2011 5:22 PM, Chuck Payne wrote:
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

On Tue, Sep 20, 2011 at 05:43:46PM -0400, Brian K. White wrote: [ 8< ]
Please file a bugreport or feature request to get this addressed well. Please reference http://lists.opensuse.org/opensuse/2011-09/msg00550.html in the request or report. Thanks! Lars -- Lars Müller [ˈlaː(r)z ˈmʏlɐ] Samba Team SUSE Linux, Maxfeldstraße 5, 90409 Nürnberg, Germany

Am 20.09.2011 23:22, schrieb Chuck Payne:
Sorry if I wasn't clear enough. :) I don't want to set the system time. I have a backup script in /etc/cron.daily that generates havy cpu load for some minutes. On my older system it ran late at night but now it executes in the working hours. Now I'm wondering if I could set the time when cron runs those daily scripts. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

Andreas said the following on 09/20/2011 05:50 PM:
Why not "Don't bother"? If you want to run a script late at night, why put it in cron.daily? Why not make a separate crontab entry for it that has it run late at night? Take it out of cron.daily and put it in a separate file. -- They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2011-09-20 at 23:11 +0200, Andreas wrote:
That was by chance, it doesn't run at an exact time. You can, however, edit "/etc/sysconfig/cron" and set the time in DAILY_TIME. And some other variables more. - -- Cheers, Carlos E. R. (from 11.4 x86_64 "Celadon" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAk55C6QACgkQtTMYHG2NR9UaKwCdGi587CeFbB1aJMIa0m5/FXop axEAn2gdvYj684y6VtEX3QaxJbLtp1hy =H2zo -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (6)
-
Andreas
-
Anton Aylward
-
Brian K. White
-
Carlos E. R.
-
Chuck Payne
-
Lars Müller